A wrapper on top of JSX to make outputting text on a terminal with chalk a HTML-like experience.
How to use
/** @jsx chx */import chx from 'chx';console
and make sure the babel transform
react-jsx is in place.
- All the colors, modifiers and bgColors from
chalkare available as tags. For example:
- The HTML shorthands are exposed when available:
- A special
<bg color>element is available as a shorthand.
- To wrap, we expose a few noop elements. Use whichever you like most:
For more advanced terminal UI needs, check out react-blessed.