text animations
Encrypted Text
Characters scramble through random glyphs and progressively resolve to the real text — a military terminal-style decrypt effect. Supports four reveal directions.
Installation
Usage
Anatomy
Good to know
childrenmust be a plain string.- It plays as soon as it mounts. Set
trigger={false}and switch it totrueto start it later, for example when it scrolls into view. revealDirectionis"ltr","rtl","center"or"random".speedandmaxIterationscontrol how long it takes.- Screen readers get the final text through
aria-label; the changing characters are hidden from them. - When the user has turned on reduced motion, the text shows straight away with no cipher characters;
onCompletestill fires.
Props
Examples
Hero Headline
Large heading decrypts left-to-right on mount with a fast speed and high maxIterations for a dramatic reveal.
Terminal Session
CLI commands decrypt sequentially as the user presses "Enter", simulating a live terminal session. Each command is a separate EncryptedText instance.
Direction Picker
Buttons trigger a replay with each of the four revealDirection values — ltr, rtl, center, random — to compare the effects side by side.