blessed-grid-layout

v1.0.0
A grid layout for blessed
blessed blessed-layout layout

blessed-grid-layout

A grid layout for blessed.

NPM version NPM Total Downloads
Dependency Status Greenkeeper badge
semantic-release commitizen
Build Status Coverage percentage

Installation

npm install --save blessed-grid-layout

Usage

const GridLayout = require('blessed-grid-layout');
const blessed = require('blessed');

const parent = blessed.box(); // Can be a screen too, doesn't matter.

const grid = new GridLayout({
  columns: 2,
  rows: 1,
  parent
});

const leftBox = grid.add({
  column: 0,
  row: 0,
  height: 1,
  width: 1,
  element: blessed.box,
  options: {
    label: 'left'
  } // passed down to the element constructor.
});

const rightBox = grid.add({
  column: 0,
  row: 0,
  height: 1,
  width: 1,
  element: blessed.box,
  options: {
    label: 'right'
  }
});

const screen = blessed.screen();
screen.append(leftBox);
screen.append(rightBox);
screen.render();

License

MIT © Sven Lechner

Metadata

  • MIT
  • Whatever
  • Sven Lechner
  • released 5/5/2018

Downloads

Maintainers