boxen is a JavaScript library for rendering text inside customizable boxes in terminal applications. Developers provide text and configuration options, and the package generates the corresponding Unicode terminal layout. Borders can use predefined styles or fully custom character sets, with configurable colors and opacity. Boxes can include titles with independent alignment controls and can position their contents to the left, center, or right. Width, height, padding, margins, background colors, and horizontal placement can all be customized. The library can also expand a box to use the available terminal screen area through its fullscreen option. It is useful for notices, status panels, warnings, summaries, and visually separating important command-line output.
Features
- Multiple predefined and custom border styles
- Configurable border and background colors
- Box titles with adjustable alignment
- Width, height, padding, and margin controls
- Left, center, and right text positioning
- Fullscreen terminal box rendering