starlight-textfx
v1.0.0
Published
Text effects for Starlight CLI: banners, gradients, boxes, and emphasis
Maintainers
Readme
starlight-textfx
Description
starlight-textfx is a terminal-safe text effects library designed for Starlight.
It provides banners, gradients, boxes, colors, and emphasis using features
that are fully supported by modern terminals.
This package does NOT attempt to change fonts. Instead, it uses ANSI colors, Unicode, and ASCII effects that work everywhere.
Why starlight-textfx?
- Works on Windows, macOS, and Linux
- No fake font hacks
- Uses reliable terminal features
- Composable and simple API
Installation
npm install starlight-textfx
Available Features
- Color text using ANSI colors
- Gradient and rainbow text
- ASCII banner text
- Boxed layouts
- Text emphasis (bold, underline, dim)
Functions
color(text, colorName)
Apply a single color to text.
color("Hello World", "cyan")
gradientText(text, theme)
Apply gradient or rainbow coloring.
gradientText("Gradient Text", "rainbow")
banner(text, font)
Create ASCII banner text.
banner("STARLIGHT", "Standard")
box(text, options)
Wrap text inside a styled box.
box("Boxed Message")
emphasize(text, style)
Apply emphasis such as bold or underline.
emphasize("Important", "bold")
Combined Effects
You can combine multiple effects using the fancy function.
fancy("All Effects", {
gradient: "rainbow",
emphasize: "bold",
box: { borderStyle: "double" }
})
Example Usage in program.sl
` import textfx from "starlight-textfx"
sldeploy( textfx.banner("STARLIGHT") )
sldeploy( textfx.gradientText("Beautiful Terminal Text", "pastel") )
sldeploy( textfx.box( textfx.color("This is inside a box", "cyan") ) ) `
Pros
- Reliable across all terminals
- Easy to use with Starlight
- Highly visual output
- Extensible for future effects
Summary
starlight-textfx is the correct way to create visually rich terminal output. It respects terminal limitations while still delivering modern and expressive text effects for developers.
