gridland
Components

Ascii

ASCII art text rendering with multiple font styles

Renders text as large ASCII art using the <ascii-font> OpenTUI intrinsic. Supports multiple font styles and custom colors.

Ascii
?

Run demo

Terminal
bunx @gridland/demo ascii
Terminal
curl -fsSL https://raw.githubusercontent.com/thoughtfulllc/gridland/main/scripts/run-demo.sh | bash -s ascii

Installation

Terminal
bunx create-gridland add ascii

Usage

import { Ascii } from "@/components/ui/ascii"
<Ascii text="Hello" font="slick" color="#88c0d0" />

Examples

Fonts

Use the font prop to change the ASCII art style.

Font styles
<Ascii text="Hello" font="tiny" />
<Ascii text="Hello" font="block" />
<Ascii text="Hello" font="slick" />
<Ascii text="Hello" font="shade" />

Custom Color

Override the default theme color.

Custom color
<Ascii text="Hello" font="slick" color="#05FFA1" />
<Ascii text="Hello" font="block" color="cyan" />

With Theme Color

Use useTheme() for semantic coloring.

Theme color
import { useTheme } from "@/lib/theme"

const theme = useTheme()

<Ascii text="OK" font="block" color={theme.success} />
<Ascii text="ERROR" font="block" color={theme.error} />

As a Header

ASCII art works well as a splash header for CLI apps.

App header
<box>
  <Ascii text="myapp" font="slick" color="#88c0d0" />
  <text>v1.2.0 — A tool for doing things</text>
</box>

API Reference

Ascii

PropTypeDefaultDescription
textstring-Text to render as ASCII art
font"tiny" | "block" | "slick" | "shade""tiny"ASCII font style
colorstringtheme.primaryForeground color