Boxes & Borders
$

Box

FREE

Terminal panels with titles, padding, colored borders, nested content, and six border styles.

static output6 stylespanel

# Preview

rounded-box demo
BOOTING PREVIEW

# Usage

import { Box, fg, style, colorize } from '@taracod/termui';

const box = new Box({
  title: 'Server Status',
  borderStyle: 'round',
  borderColor: fg.cyan,
  padding: 1,
});

console.log(box.render(
  colorize('Status: ', fg.gray) + colorize('? Online', fg.green, style.bold) + '\n' +
  colorize('Uptime: ', fg.gray) + '12d 4h 32m' + '\n' +
  colorize('CPU:    ', fg.gray) + colorize('23%', fg.yellow)
));

# API

PropTypeDefaultDescription
titlestringundefinedOptional title embedded into the top border
borderStyleBorderStyleroundround, single, double, heavy, dashed, ascii
borderColorAnsiColorcyanColor used for border glyphs
paddingnumber1Inner spacing around rendered content
Support TermUI