---
title: "Text Scan Glitch"
description: "A band moves down the heading one step a frame, with a thin colored line, like a bad video signal."
url: https://gelatinui.com/components/text-scan-glitch
markdown_url: https://gelatinui.com/components/text-scan-glitch.md
access: free
install: "npx shadcn@latest add @gelatin-ui/text-scan-glitch"
registry_item: https://gelatinui.com/r/text-scan-glitch.json
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Text Scan Glitch

> A band moves down the heading one step a frame, with a thin colored line, like a bad video signal.

Page: https://gelatinui.com/components/text-scan-glitch

## When to use it

Best for: One short heading or a game title with a tech or retro mood: one Glitch Text a page.

- Use `trigger="hover"` in a link or a button: it glitches while a pointer is over the control, or keyboard focus is on it.
- Use `trigger="mount"` or `trigger="view"` for one burst on a heading.
- Use `interval` (seconds, at least 1.5) and `intensity` to set how often and how far it breaks.

## When not to use it

- For the same effect with another look, use [Text Slice Glitch](https://gelatinui.com/components/text-slice-glitch.md).
- For letters that change at random, then settle into the text, use [Text Scramble](https://gelatinui.com/components/text-scramble.md).
- For stars that twinkle around a word, use [Text Sparkles](https://gelatinui.com/components/text-sparkles.md).
- For body text, a long paragraph, or a page with more than one glitch, use plain text.

## Notes for agents

- Scan Glitch owns its look: it builds on Glitch Text and takes every other Glitch Text prop and part.
- A burst is 3 steps of 80ms, then at least 1s with no change, for every trigger. So no second shows more than 2 flashes (the limit is 3).
- The frames are seeded (`seed`, default from the text): the same text always glitches the same way, on the server and in the browser. Each frame is written as CSS custom properties on the root, with no React render.
- `trigger="loop"` (default) stops off screen, in a hidden tab, while `paused` is true, and while a mouse is over it or keyboard focus is on the link or button around it (`pauseOnHover`, default true).
- `trigger="hover"` starts on the nearest link or button around the text, else on the text, for a mouse or a pen, not a tap. It stops in a hidden tab and while `paused` is true. On a touch screen, use `view` or `loop` for a glitch that people must see.
- The split copies take the item colors `--glitch-text-a` and `--glitch-text-b`, with values for light and dark. An empty text runs no burst.

## Anatomy

```text
TextScanGlitch
```

## API reference

### TextScanGlitch

| 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. |
| `pauseOnHover` | `boolean` |  | Hold the motion while a mouse is over the item, or keyboard focus is on the link or button around it (or in it). Default true. |
| `children` | `string` |  | The text, such as a heading or a product name. |
| `trigger` | `"hover" \| "loop" \| "mount" \| "view"` |  | When it glitches: `loop` (short bursts with a gap, default), `hover` (while a pointer is over it, or the keyboard focuses the link or button around it), `mount` (one burst at once), or `view` (one burst the first time it is on screen). |
| `interval` | `number` |  | Seconds between two bursts of a `loop`, ±40%. Default 4, at least 1.5. |
| `intensity` | `"default" \| "strong" \| "subtle"` |  | How far the pieces move: `subtle`, `default`, or `strong`. |
| `seed` | `number` |  | The seed of the frames and the gaps. Default: from the text, so each text has its own. |
| `locale` | `string` |  | The BCP 47 locale for the letter split of a look with `letters` (`Intl.Segmenter`). Default: the `DisplayLocaleProvider` locale, else `"en-US"`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| TextScanGlitch | `text-scan-glitch` |  |  |  |

## Usage

Wrap the text of a heading. Set `trigger="hover"` in a link or a button.

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

```bash
npx shadcn@latest add @gelatin-ui/text-scan-glitch @gelatin-ui/button
```

```tsx title="not-found.tsx"
import { ArrowLeftIcon } from "@phosphor-icons/react/ssr";

import { TextScanGlitch } from "@/components/text/text-scan-glitch";
import { Button } from "@/components/ui/button";

export function NotFound() {
  return (
    <main className="flex max-w-lg flex-col items-start gap-4 py-24">
      <p className="font-mono text-sm text-muted-foreground">Error 404</p>
      <h1 className="text-6xl font-bold tracking-tight">
        <TextScanGlitch interval={3}>
          Page not found
        </TextScanGlitch>
      </h1>
      <p className="text-muted-foreground">
        The link may be broken, or the page may have moved.
      </p>
      <Button nativeButton={false} render={<a href="/" />}>
        <ArrowLeftIcon data-icon="inline-start" />
        <TextScanGlitch trigger="hover">
          Back to home
        </TextScanGlitch>
      </Button>
    </main>
  );
}
```

## 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/text-scan-glitch
```

It adds 23 registry items: 23 files, 2402 lines, and the npm packages `@mantine/hooks`, `@xstate/react`, `clsx`, `tailwind-merge`, `tailwind-variants`, `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 Slice Glitch](https://gelatinui.com/components/text-slice-glitch.md)
- [Text Split Glitch](https://gelatinui.com/components/text-split-glitch.md)
- [Text Scramble](https://gelatinui.com/components/text-scramble.md)
- [Text Sparkles](https://gelatinui.com/components/text-sparkles.md)
- [Text Split Flap](https://gelatinui.com/components/text-split-flap.md)
- [Button](https://gelatinui.com/components/button.md)

## Keyboard

| Keys | Action |
| --- | --- |
| Tab | With `trigger="hover"`, keyboard focus on the link or button around the text starts the glitch. With a loop, the focus holds it. |

## Motion

| Part | Motion |
| --- | --- |
| Burst | instant · 3 steps of 80ms · each step shows a new seeded frame: moved bands, a color split, a scan band, or letter marks, with a small lean |
| Rest | instant · after a burst, the text rests at least 1s, so no second holds more than 2 flashes |
| Loop | instant · `interval` seconds (default 4, at least 1.5) between bursts, ±40%, seeded |
