# Anagram Shuffle

> Letters rearrange themselves into the next anagram.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Text Animations › Transitions |
| Live preview | https://uibrik.com/components/anagram-shuffle |
| Writes | 1 file into `components/uibrik/anagram-shuffle/` |
| Packages | `motion` (the CLI installs them) |
| 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/anagram-shuffle.json
```

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

Can't run commands? https://uibrik.com/components/anagram-shuffle/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 { AnagramShuffle } from "@/components/uibrik/anagram-shuffle/anagram-shuffle";

<AnagramShuffle
  play={0}
  words={["LISTEN", "SILENT", "ENLIST", "TINSEL"]}
  duration={0.45}
/>
```

## Tune it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `words` | `string[]` | `["LISTEN","SILENT","ENLIST","TINSEL"]` | Anagrams of each other, cycled one per play. |
| `duration` | `number` | `0.45` | Time for letters to glide to their new slots. |

## Wire it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `play` (required) | `number` |  | Each change plays the effect again; 0 shows its resting state. |

## Where it fits

- **Rotating hero headlines**: Letters rearrange into the next phrase in place, so a headline can cycle through benefits without a jump in layout. Pairs with [Rolling Word](https://uibrik.com/components/rolling-word.md).
- **Personal portfolios**: Shuffling a name into a role, or one title into another, makes a short intro memorable with nothing but type.
- **Word and puzzle games**: Letters physically moving between words suits splash screens and level transitions for word games.

## Same shelf: Transitions

- [Crumble to Sand](https://uibrik.com/components/crumble-to-sand.md) (Pro): The phrase crumbles into grains that rebuild the next one.
- [Particle Scatter](https://uibrik.com/components/particle-scatter.md): Each press breaks the phrase into particles that regroup.
- [Redact and Reveal](https://uibrik.com/components/redact-reveal.md): Black bars redact a line, then lift to reveal the next.
- [Rolling Word](https://uibrik.com/components/rolling-word.md): One word rolls to the next like a drum.
- [Scatter Text](https://uibrik.com/components/scatter-text.md): Phrases shatter into particles that regroup into the next phrase.
- [Scramble to Word](https://uibrik.com/components/scramble-to-word.md): A split-flap board scrambles to the next word.

## Ground rules

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