# Scatter Text

> Phrases shatter into particles that regroup into the next phrase.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Text Animations › Transitions |
| Live preview | https://uibrik.com/components/scatter-text |
| Writes | 1 file into `components/uibrik/scatter-text/` |
| Packages | none beyond React |
| Needs | React 19, Tailwind CSS v4, a project set up with `npx shadcn@latest init` |
| Theme | Reads the shadcn tokens and follows class-based dark mode ([theming](https://uibrik.com/docs/theming.md)) |
| Updated | Nov 9, 2026 |

## Add it

```bash
npx shadcn@latest add https://uibrik.com/r/scatter-text.json
```

With the `@uibrik` namespace in `components.json` ([setup](https://uibrik.com/docs/installation.md)): `npx shadcn@latest add @uibrik/scatter-text`.

Can't run commands? https://uibrik.com/components/scatter-text/prompt.txt has every file verbatim, with the setup steps, ready for an assistant to write.

## Render it

Renders as is; every value shown is the default, so delete any line you don't need.

```tsx
import { ShatterText } from "@/components/uibrik/scatter-text/shatter-text";

const phrases = ["Generating prompt...", "Optimizing weights...", "Deploying model...", "Analyzing context...", "Processing input...", "Understanding intent...", "Retrieving context...", "Running inference...", "Evaluating response..."];

<ShatterText
  phrases={phrases}
  displayDuration={2}
  waveSpeed={1.25}
  shimmerSpeed={1.4}
  shimmerWidth={120}
  particleCount={3000}
  scatterRadius={[20, 50]}
  textAlign="left"
  shimmer
  // color="…"
  // flightColor="…"
  // glowColor="…"
  // shimmerColor="…"
  // trigger={0}
/>
```

## Tune it

The same props as the Customize panel on https://uibrik.com/components/scatter-text.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `phrases` | `string[]` | `["Generating prompt...","Optimizing weights...","Deploying model...","Analyzing context...","Processing input...","Understanding intent...","Retrieving context...","Running inference...","Evaluating response..."]` | Phrases to cycle through. |
| `displayDuration` | `number` | `2` | Seconds each phrase holds. |
| `waveSpeed` | `number` | `1.25` | Speed of the scatter wave. |
| `shimmerSpeed` | `number` | `1.4` | Speed of the shimmer sweep. |
| `shimmerWidth` | `number` | `120` | Width of the shimmer beam. |
| `particleCount` | `number` | `3000` | Particles sampled across the text. |

## Wire it

The props the Customize panel doesn't show: ranges, data, content and callbacks.

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `scatterRadius` | `[number, number]` | `[20, 50]` | Min and max scatter distance in px. |
| `color` | `string` |  | Base text colour; inherits from className when omitted. |
| `flightColor` | `string` |  | Particle colour while scattered. |
| `glowColor` | `string` |  | Colour at the peak of the wave. |
| `shimmerColor` | `string` |  | Shimmer highlight colour. |
| `textAlign` | `"center" \| "left" \| "right"` | `"center"` | Alignment inside the canvas. |
| `trigger` | `number` |  | When set, each change advances the phrase instead of a timer. |
| `shimmer` | `boolean` | `true` | Run the shimmer sweep while a phrase rests. |
| `className` | `string` |  | Container classes; colour, size, weight and family are read from them. |

## Where it fits

- **Rotating headlines**: Phrases shattering into particles that regroup make transitions dramatic. Pairs with [Particle Scatter](https://uibrik.com/components/particle-scatter.md).
- **Tech brands**: Particle text suits AI, science and data products.
- **Portfolio intros**: A shattering reveal adds energy to a short introduction.

## Same shelf: Transitions

- [Scramble to Word](https://uibrik.com/components/scramble-to-word.md): A split-flap board scrambles to the next word.
- [Slot-machine Letters](https://uibrik.com/components/slot-letters.md): Each letter spins like a reel and lands on the next word.
- [Status Stamp](https://uibrik.com/components/status-stamp.md): An ink stamp slams down: approved, in review, rejected.
- [Zoom Past](https://uibrik.com/components/zoom-past.md): Words fly toward you and the next one arrives behind.
- [Anagram Shuffle](https://uibrik.com/components/anagram-shuffle.md): Letters rearrange themselves into the next anagram.
- [Crumble to Sand](https://uibrik.com/components/crumble-to-sand.md) (Pro): The phrase crumbles into grains that rebuild the next one.

## Ground rules

- Only the props above exist. To change anything else, edit the installed file.
- Keep the files in `components/uibrik/scatter-text/` so the import paths keep resolving.
- The playbook for working with the whole library: https://uibrik.com/llms.txt
