How to use the element function from blessed

Find comprehensive JavaScript blessed.element code examples handpicked from public code repositorys.

147
148
149
150
151
152
153
154
155
156
  left: sidePanelWidth + 1,
  right: 1,
  height: 14
})

var formLabelLocal = blessed.element({
  parent: form,
  content: ['Name\n\nType\n\nKey Encoding                Value Encoding',
            '\n\n\n\nPath\n\nCache Size\n\nCompression'].join(''),
  left: 1,
fork icon41
star icon0
watch icon2

+ 3 other calls in file

3
4
5
6
7
8
9
10
11
12
const UserTag = require('./UserTag');
const MessageContent = require('./MessageContent');

function Message({ message }) {
  if (message.type === 'DEFAULT') {
    return blessed.element({
      children: [
        new Timestamp({ date: message.createdAt }),
        new UserTag({ member: message.member, user: message.author }),
        new MessageContent({ message }),
fork icon7
star icon0
watch icon2

+ 7 other calls in file

253
254
255
256
257
258
259
260
261
262
function takeScreenshot(name) {
  var filename = name.replace(/\//g, '.') + '.ans.sgr';
  var image;
  // Animating art hangs terminal during screenshot as of right now.
  if (~ANIMATING.indexOf(name)) {
    image = blessed.element.prototype.screenshot.call(art,
      0 - art.ileft, art.width - art.iright,
      0 - art.itop, art.height - art.ibottom);
  } else {
    image = art.screenshot();
fork icon0
star icon0
watch icon0

+ 9 other calls in file

42
43
44
45
46
47
48
49
50
51
  }, cb)
}

function runAllGroups(cb) {
  const screen = blessed.screen({smartCSR: true})
  const root = blessed.element({
    top: 0,
    left: 0,
    width: '100%',
    height: '100%'
fork icon0
star icon0
watch icon2