1.0.1 • Published 6 years ago

blessed-grid-layout v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

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

1.0.1

6 years ago

1.0.0

6 years ago