ScrambleText
ScrambleText is a 1kb React component for creating scramble text animations.
Unlike most scramble text implementations, ScrambleText uses Motion for React's motion value rendering to avoid React re-renders.
ScrambleText is exclusive to Motion+ members. Motion+ is a one-time payment, lifetime membership that unlocks exclusive components, premium examples and access to a private Discord community.
Features
Stagger: Use Motion's
staggerfunction for bothdelayanddurationto create letter-by-letter reveal effects.Performant: Renders via Motion's high-performance animation loop, skipping React re-renders.
Playback control: Toggle the
activeprop to start/stop scrambling, perfect for hover effects or scroll-triggered animations.Customisable characters: Use the default alphanumeric set, or provide custom characters (including emoji).
Install
First, add the motion-plus package to your project using your private token. You need to be a Motion+ member to generate a private token.
Usage
By passing a string as the ScrambleText child, it will animate that text in character by character.
Stagger
Use Motion's stagger() function to reveal characters one by one:
Delay
Stagger when each character starts scrambling by passing stagger to delay:
Direction
Use stagger's from option for controlling the direction of stagger:
Infinite scramble
By default, text will scramble for 1 second. By setting duration to Infinity, text will scramble for as long as the active prop is true.
Custom characters
By default, ScrambleText uses the full alphanumeric character set to scramble text. You can provide other characters as a string or array
Some useful presets include:
Or, to use only the characters in the provided text content, pass the content itself:
Playback control
Toggle the active prop to control playback:
When active becomes false, characters reveal immediately (preserving any stagger offsets).


