ASCII Text converts any string into chunky ASCII block letters and animates them in your browser. Pick between wave, scan, glitch, typewriter, and pulse modes to drive the entrance, and tune speed, color, and reveal order per instance. Built with React and Tailwind CSS, no canvas or WebGL needed. Suits terminal-inspired landing pages, hero headings, and code-forward branding.
Installation
Usage
import { AsciiText } from "@/components/ui/ascii-text";<AsciiText text="NYX UI" animation="wave" />Colour is inherited, so it themes with the surrounding text unless you set it:
<div className="text-emerald-400">
<AsciiText text="ONLINE" animation="scan" glow />
</div>Props
| Prop | Type | Default | Description |
|---|---|---|---|
text | string | "NYX UI" | Text to render. Upper-cased automatically. |
animation | "none" | "wave" | "glitch" | "typewriter" | "pulse" | "scan" | "wave" | How the glyphs animate. |
speed | number | 1 | Animation rate multiplier. |
fontSize | number | 14 | Glyph size in px. Ignored while autoFit is on. |
autoFit | boolean | true | Scale the glyphs so one line fills the container width. |
letterSpacing | number | 2 | Blank columns between letters. |
color | string | — | Any CSS colour. Defaults to the inherited text colour. |
glow | boolean | false | Add a soft glow behind the glyphs. |
ramp | string | "░▒▓█" | Characters used for a lit cell, darkest to lightest. |
className | string | — | Classes for the wrapper. |
