blessed-grid-layout

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i blessed-grid-layout

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

5.89 kB

Total Files

3

Last publish

Collaborators

  • sirwindfield