useScramble
free1 KB React hook that scrambles text through random characters before settling (decrypt effect).

Try these
GSAP
Timeline animation engine with ScrollTrigger, SplitText, Flip and MorphSVG, now free including every plugin.
Torph
Animated text morphing: labels change letter by letter instead of swapping.
Vaul
Unstyled drawer for React that replaces dialogs on mobile: drag to dismiss, snap points, scaled background.
Embla Carousel
Small, dependency-free carousel engine with great swipe physics; you bring all the markup and styles.
Looks that pick it
Cyberpunkfirst pickSci-fi HUDfirst pickASCIIfirst pickTerminal (CRT)first pickAnti-designAcid graphicsGame UI
For your agent
Install
npm i use-scrambleUse it for
- a terminal or hacker-styled heading that decodes on load or hover
- a nav link that scrambles on hover in a dev-tool or cyber aesthetic
- a typewriter headline that types itself out on load (scramble: 0)
Skip it when
- minimal, apple, luxury or corporate looks: the effect reads as gimmicky
- anything users must read quickly (buttons, errors, data): the text is unreadable mid-animation
- you already use GSAP: its ScrambleTextPlugin does the same
What's inside5 free
- useScramble
- replay()
- Options (speed, tick, step, scramble, seed, chance, range, overdrive, overflow, ignore)
- Callbacks (onAnimationStart, onAnimationFrame, onAnimationEnd)
- Reduced motion
Facts
- Frameworks
- react
- Styling
- unstyled
- Weight
- tiny
- Accessibility
- weak
- Maturity
- stable
- License
- MIT
- Price
- Free
import { useScramble } from 'use-scramble'
const { ref, replay } = useScramble({ text: 'Access granted', speed: 0.6, scramble: 4 })
<h1 ref={ref} onMouseEnter={replay} aria-label="Access granted" />https://use-scramble.dev
Loading website