blessed-grid-layout
v1.0.1
Published
A grid layout for blessed
Downloads
3
Maintainers
Readme
blessed-grid-layout
A grid layout for blessed.
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