---
title: "Text ASCII"
description: "Text drawn in small code glyphs that decode from noise, scramble near the pointer, and ripple out on a press."
url: https://gelatinui.com/components/text-ascii
markdown_url: https://gelatinui.com/components/text-ascii.md
access: pro
install: "npx shadcn@latest add @gelatin-ui-pro/text-ascii"
version: "2026-11-14"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text ASCII

> Text drawn in small code glyphs that decode from noise, scramble near the pointer, and ripple out on a press.

Page: https://gelatinui.com/components/text-ascii

## When to use it

Best for: One short, large display heading with a terminal or code mood: one or two words of 60px or more.

- Wrap the text of a heading. Large, heavy text reads best: a capital is about 7 rows of glyphs.
- Use `characters` for the glyph ramp, from the empty cell to full cover: ` ░▒▓█` for blocks, ` 01` for binary.
- Use `cellSize` for finer or coarser glyphs. The default is the font size / 10, from 5 to 18px.
- Use `loop` to keep the slow wave going, and `paused` to stop it from a control of the page.
- Use `plain` to show the plain text, for example on a page with many effects.

## When not to use it

- For letters that change at random and settle into the text, with no WebGL, use [Text Scramble](https://gelatinui.com/components/text-scramble.md).
- For a heading made of particles that push away from the pointer, use [Text Particle](https://gelatinui.com/components/text-particle.md).
- For body text, small text, or a long paragraph, use plain text: small glyph cells do not read as letters.

## Notes for agents

- `children` must be a string. The real text stays in the line: it sets the size and the wrap, a screen reader reads it once, and the visitor can select it. The canvas on it is `aria-hidden` and takes no pointer.
- Three.js loads on demand the first time the text comes near the screen. Until the first frame draws, the text is see-through; when no frame draws in 3s, the plain text shows.
- With no WebGL 2, or when the setup fails, the plain text stays and `onError` gets the error. An empty text makes no WebGL context.
- A text off screen for 3s gives its WebGL context back and makes a new one when it comes near again, so a long page stays under the browser cap of about 16 live contexts. A hidden tab draws nothing.
- The intro and the wave stop by themselves after 5 seconds unless `loop` is true, so the GPU rests. `paused` (with `defaultPaused` and `onPausedChange`) stops them; the pointer still scrambles. There is no hover hold: the pointer is the effect.
- The glyphs take the text color and the scramble and the ring take `--primary`; a theme change redraws them. Scrambled glyphs change 12 times a second: the shapes change, not the colors.
- On a touch screen a finger scrambles where it is, and the page still scrolls up and down (`touch-action: pan-y`).

## Anatomy

```text
TextAscii
```

## API reference

### TextAscii

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `paused` | `boolean` |  | The pause of the user or the page (controlled). |
| `defaultPaused` | `boolean` |  | The first pause when `paused` is not given (uncontrolled). Default false. |
| `onPausedChange` | `function` |  | Called when the pause changes. |
| `children` | `string` |  | The text. Large display text reads best: each letter is built from about 7 rows of glyphs. |
| `characters` | `string` | ASCII_TEXT_CHARACTERS | The glyph ramp, from empty to full cover (the first glyph is the empty cell). Default `.:-=+*#%@`. |
| `cellSize` | `number` |  | The cell height in px. Default: the font size / 10, from 5 to 18px. |
| `intro` | `boolean` | true | Decode the text from glyph noise the first time it shows. Default true. |
| `loop` | `boolean` | false | Keep the slow wave going. Default false: the wave stops after 5 seconds, so the GPU rests. `paused` stops a looping wave. |
| `ripple` | `boolean` | true | A press sends a ring of glyphs out from the press point. Default true. |
| `plain` | `boolean` | false | Show the plain text, with no WebGL. |
| `onError` | `function` |  | Called when three.js does not load or the WebGL setup fails. The plain text stays. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextAscii | `text-ascii` |  |  |  |

## Usage

Wrap the text of a large heading. Keep the rest of the page plain.

The sample also uses `badge`, `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui-pro/text-ascii @gelatin-ui/badge @gelatin-ui/button
```

```tsx title="release-hero.tsx"
import { TerminalIcon } from "@phosphor-icons/react/ssr";

import { TextAscii } from "@/components/pro/text/text-ascii";
import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button";

export function ReleaseHero() {
  return (
    <section className="flex max-w-3xl flex-col items-start gap-4 py-24">
      <Badge variant="secondary">Release 4.0</Badge>
      <h1 className="text-7xl font-black tracking-tight sm:text-8xl">
        <TextAscii>SHIP IT</TextAscii>
      </h1>
      <p className="max-w-md text-muted-foreground">
        A command line that deploys in one step.
      </p>
      <Button>
        <TerminalIcon data-icon="inline-start" />
        Install the CLI
      </Button>
    </section>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui-pro/text-ascii
```

It adds 38 registry items: 38 files, 6054 lines, and the npm packages `@mantine/hooks`, `@xstate/react`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`, `three`, `xstate`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Text Particle](https://gelatinui.com/components/text-particle.md)
- [Text Scramble](https://gelatinui.com/components/text-scramble.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | Keyboard focus on the link or button around the text sweeps the scramble once along the line. |

## Motion

| Part | Motion |
| --- | --- |
| Intro | reveal · 1.4s · each cell starts at a seeded moment in the first 55% and settles from glyph noise into its glyph over the rest |
| Scramble | cursorFollow · the glyphs near the pointer change 12 times a second in the `--primary` color; the pointer place follows on a spring |
| Ring | press · 1.2s · a ring of glyphs goes out from the press point to the far side and fades; at most 4 rings at once |
| Wave | sine · the grid reads the text through a slow sine wave, which eases out by 5s unless `loop` is true |
