Special/TextScramble

TextScramble

Matrix-style character scramble that resolves character by character to the final string. Trigger on mount or hover. Configurable charset, speed, and reveal rate.

import { TextScramble } from "@animui/ui"

Mount trigger

Scrambles on page load — great for hero headings.

Hover trigger

Hover to scramble

Binary charset

Props

PropTypeDefaultDescription
textstringThe final text to reveal.
trigger"mount" | "hover""mount""mount" runs on load; "hover" runs each time the cursor enters.
speednumber40Milliseconds between each scramble frame.
delaynumber0Milliseconds to wait before starting the scramble.
revealSpeednumber0.3Characters revealed per frame (higher = faster left-to-right reveal).
charsetstringABCDEF…0123456789!@#…Characters used during the scramble phase.
as"span" | "p" | "h1" | "h2" | "h3" | "div""span"HTML element to render.
onComplete() => voidCalled when the scramble finishes.
classNamestringAdditional classes.
© 2026 Steal Shadow. MIT License.Report an issue