# Glitch Text

> A signal breaking up in short bursts.

Slices tear sideways while offset copies split into channels. For error pages, game titles and system moments. Monochrome with chroma off.

- Family: Typography
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/glitch-text/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add glitch-text
```

It installs to `components/galactrex/glitch-text.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

```tsx
import { GlitchText } from "@/components/galactrex/glitch-text";

<GlitchText as="h1" text="SIGNAL LOST" />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` | `string` | — | The text. |
| `as` | `ElementType` | `"span"` | Element. |
| `trigger` | `"hover" \| "interval" \| "always"` | `"interval"` | When it glitches. |
| `every` | `number` | `3.5` | Seconds between bursts. |
| `intensity` | `number` | `6` | Tear distance in px. |
| `chroma` | `boolean` | `true` | Split colour channels. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Burst.** Every few seconds.
- **Mono.** `chroma={false}`.

## Accessibility

- The real text sits underneath; copies are aria-hidden.
- Avoid `always` near reading text.

## Motion

- Clip-path slices at 16 fps during bursts; pauses offscreen.
- Reduced motion: no glitch.
