@pilates/render
v1.0.0-rc.2
Published
Out-of-box renderer for @pilates/core. Declarative tree to ANSI-styled string.
Maintainers
Readme
@pilates/render
Out-of-box renderer for @pilates/core. Takes a declarative tree, returns
a painted string with ANSI styling and box-drawing borders.
import { render } from '@pilates/render';
const out = render({
width: 80,
height: 24,
flexDirection: 'row',
children: [
{ flex: 1, border: 'rounded', title: 'Logs', children: [{ text: 'hello' }] },
{ width: 20, border: 'single', title: 'Status', children: [{ text: 'ok', color: 'green' }] },
],
});
process.stdout.write(out);Status: pre-release. API subject to change.
