Overview
ASCIIFontRenderable renders text in large ASCII art fonts. It supports multiple font styles, gradient colors, text selection, and transparent backgrounds. Perfect for headers, logos, and decorative text in terminal UIs.Basic Usage
Available Fonts
Gradient Colors
With Background
Text Selection
Dynamic Text Updates
React Usage
Props
string
default:"''"
The text to render in ASCII art. Automatically resizes the component when changed.
ASCIIFontName
default:"'tiny'"
The font style to use. Available fonts:
'tiny': Compact small font'block': Bold block letters'shade': Shaded 3D effect'slick': Clean modern style'huge': Very large letters'grid': Grid-based design'pallet': Palette-style font
ColorInput | ColorInput[]
default:"'#FFFFFF'"
Text color. Can be a single color or an array of colors for gradients.
ColorInput
default:"'transparent'"
Background color behind the ASCII art.
boolean
default:"true"
Whether the text can be selected with mouse drag.
ColorInput
Background color for selected text.
ColorInput
Foreground color for selected text.
Properties
text
Get or set the displayed text.font
Get or set the font style.color
Get or set the text color(s).backgroundColor
Get or set the background color.Methods
getSelectedText()
Get the currently selected text.hasSelection()
Check if there is an active selection.Common Patterns
Application Header
Loading Animation
Status Display
Centered Title
Interactive Font Selector
Font Characteristics
Size Comparison
- tiny: ~3 lines tall, compact
- block: ~5-6 lines tall, bold
- shade: ~5-6 lines tall, 3D shaded
- slick: ~5-6 lines tall, modern
- huge: ~8-10 lines tall, very large
- grid: ~6-7 lines tall, grid-based
- pallet: ~6-7 lines tall, palette design
Best Use Cases
- tiny: Space-constrained UIs, compact headers
- block: Bold statements, attention-grabbing titles
- shade: 3D effects, depth perception
- slick: Modern clean interfaces
- huge: Splash screens, prominent displays
- grid: Technical/retro aesthetics
- pallet: Artistic/decorative text
Performance Notes
- ASCII fonts automatically resize based on text content
- Font rendering is optimized with character position caching
- Gradient colors are applied efficiently per character
- Selection handling accounts for variable-width characters