# Scramble

Decodes a line out of random glyphs, resolving characters left to right from a stable seed.

```bash
npx shadcn add https://www.reelcn.dev/r/scramble.json
```

Usage:

```tsx
<Center>
  <Scramble text="Access granted" font="mono" seed="login" />
</Center>
```

Use for:

- Tech, security and launch reveals
- Names, codes or numbers that should feel computed

Avoid:

- Long sentences. Use `text-reveal`

Dependencies:

- `remotion`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| text | `string` | — |  |
| seed? | `string \| number` | `"scramble"` | Picks the random glyphs. The same seed renders the same frames on every machine. |
| charset? | `string` | `"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789#%&*+=?"` | Glyphs shown while a character is still unresolved. |
| stagger? | `number` | — | Frames between one character starting to scramble and the next. `duration` is how long each one scrambles. |
| perCharFrames? | `number` | — | Frames each character scrambles before resolving. Wins over `duration`. Defaults to 0.6s. |
| glyphHold? | `number` | — | Frames each random glyph stays before the next. Defaults to 1/15s, so it reads as decoding, not flicker. |
| start? | `"hidden" \| "scrambled"` | `"hidden"` | Before its turn a character is hidden (the line types on), or already scrambled (the whole line decodes). |
| order? | `StaggerOrder` | `"forward"` | Which character resolves first. |
| size? | `number` | `96` | Font size in design units. |
| weight? | `number` | — |  |
| font? | `"mono" \| "heading" \| "body"` | `"heading"` |  |
| color? | `string` | — |  |
| glyphColor? | `string` | — | Color of unresolved glyphs. Defaults to the theme accent. |
| align? | `"left" \| "right" \| "center"` | `"center"` |  |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |