Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


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-text

Usage

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 test

Changelog

  • 21/08/2026 : v1.0.4 — Add test, documentation, update README

License

Licence

Author

About

[NPM Package] boxedText : A lightweight utility to center and wrap text in customizable Ascii boxes for CLI

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages