# Lean and Scramble

> Words lean and scramble under the cursor.

## Spec sheet

| | |
| --- | --- |
| Access | Free: no account, free for commercial use |
| Shelf | Text Animations › Interactive |
| Live preview | https://uibrik.com/components/lean-scramble |
| Writes | 1 file into `components/uibrik/lean-scramble/` |
| 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/lean-scramble.json
```

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

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

<LeanScramble
  play={0}
  text="Lean into every word"
  lean={10}
  duration={0.45}
  wordStagger={0.08}
  tick={40}
/>
```

## Tune it

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

| Prop | Type | Default | What it does |
| --- | --- | --- | --- |
| `text` | `string` | `"Lean into every word"` | The copy to animate. |
| `lean` | `number` | `10` | How far a word leans. |
| `duration` | `number` | `0.45` | Lean and straighten time. |
| `wordStagger` | `number` | `0.08` | Delay between words. |
| `tick` | `number` | `40` | Time between scramble frames. |

## 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

- **Interactive hero text**: Words leaning and scrambling under the cursor give a headline a technical edge. Pairs with [Scramble Text](https://uibrik.com/components/scramble-text.md).
- **Hacker-style brands**: Glitching letters suit security, crypto and developer products.
- **Portfolio intros**: A name that scrambles on hover is a small, memorable interaction.

## Same shelf: Interactive

- [Pull Toward Cursor](https://uibrik.com/components/pull-to-cursor.md): Letters lean toward the cursor like a magnet.
- [Rust Text](https://uibrik.com/components/rust-text.md): Brushed steel type that rusts while you watch and flakes away, polished back to a shine wherever the pointer passes.
- [Draggable Letters](https://uibrik.com/components/draggable-letters.md): Letters you can pull apart; they spring home.
- [Hover Weight](https://uibrik.com/components/hover-weight.md): Letters grow heavier as the cursor nears them.

## Ground rules

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