@cafeine-software/boxed-text
v1.0.4
Published
Display a text in an ascii box
Maintainers
Readme
Introduction • Demo • Installation • Usage • License • Author
Introduction
A lightweight utility to wrap text in customizable Unicode boxes. It automatically centers the text and can output directly to the console or return a formatted multi-line string.
Demo
Installation
npm i @cafeine-software/boxed-textUsage
import { boxedText, BOX_STYLE } from "@cafeine-software/boxed-text";
// Display the boxed text with default style BOX_STYLE.LIGHT
boxedText("Hello World");
// Get the boxed text as a string
const result = boxedText("BAR", BOX_STYLE.HEAVY, false);Style Constant
Available style are :
- LIGHT
- HEAVY
- DOUBLE
- ROUNDED
- VERTICAL_LIGHT_&_HEAVY_TOP
- VERTICAL_HEAVY_&_LIGHT_TOP
- VERTICAL_LIGHT_&_DOUBLE_TOP
- VERTICAL_DOUBLE_&_LIGHT_TOP
Test
npm testChangelog
- 21/08/2026 : v1.0.4 — Add test, documentation, update README
