A text scramble reveal animation that decodes characters on mount or when re-triggered, powered by Motion. React.
Made by AxylInstallation
File Structure
Usage
Re-run the animation by toggling trigger:
Run on hover instead of on mount (trigger is ignored automatically):
Color sweep while decoding — scramble noise in one color, revealed letters keep your text color:
holdDuration scrambles in place first; then the reveal sweeps left to right.
Props
| Prop | Type | Default |
|---|---|---|
children? | string | - |
as? | ElementType | "p" |
scrambleColor? | string | - |
holdDuration? | number | 0 |
duration? | number | 0.8 |
speed? | number | 0.04 |
characterSet? | string | - |
trigger? | boolean | true |
triggerOnHover? | boolean | false |
className? | string | - |
onScrambleComplete? | () => void | - |
When to Use
Use TextScramble for hero headings, data dashboards revealing a new value, or any reveal moment where the text should feel like it is being decoded. It pairs well with monospace or uppercase fonts where individual character changes are visually clear.
The triggerOnHover mode works well for navigation labels and interactive buttons that reward hovering.
Accessibility
The final decoded text is always in the DOM — the scramble is a visual effect applied character by character. Screen readers announce the final string. When prefers-reduced-motion: reduce is set, the component already skips the scramble automatically (via useReducedMotion()) and renders the final text directly — no extra configuration needed.
Built by Axyl. A motion-first component registry for React.
Last updated: 7/26/2026