text animations
Scramble Hover
Text scrambles through random characters on hover, then resolves back to the original string when the cursor leaves.
Installation
Usage
Anatomy
Good to know
childrenmust be a plain string.- The effect plays on hover, so there's nothing to see on touch screens.
- Set
useOriginalCharsOnlyto scramble with the text's own letters instead ofcharacterSet. - Screen readers get the text through
aria-label; the scrambled characters are hidden from them. - When the user has turned on reduced motion, hovering does not scramble the text;
onHoverStartandonHoverEndstill fire.
Props
Examples
Navigation Links
A row of nav items that each scramble independently on hover. Lower scrambleSpeed and maxIterations keep it snappy.
Hero Heading
Full heading scrambles with revealDirection="center" for a symmetric decode effect. Pairs well with a supporting label.
Repository Card
Multiple ScrambleHover instances inside a card — title decodes left-to-right while metadata uses useOriginalCharsOnly for a subtler shuffle.