← All presets
Foundationper-character

Scramble Reveal

Characters cycle through random glyphs to their final letter.

pnpm

Installation

Run the following command:

pnpmdlx shadcn@latest add https://mutype.dev/r/scramble-reveal.json

Props

PropTypeDefaultDescription
specAnimationSpecAnimation spec object (imported from components/mutype/specs/<id>).
textstringThe text to animate.
as"span" | "div" | "h1"–"h4" | "p""span"The HTML element to render.
triggerKeystring | numberRe-runs the animation when the value changes.
duration_multipliernumber1Scales duration_ms and stagger_ms uniformly. >1 slower, <1 faster.
y_travel_multipliernumber1Multiplier on y_px values; useful to dampen lift on small text.
forceReducedMotionbooleanfalseForces the reduced-motion fallback even when the user has not opted in (testing).
onFinished() => voidFires once when the enter phase completes (not on cancel).
classNamestringTailwind / CSS class names. Forwarded to the host element.

Usage notes

The pure spec only handles the per-character opacity envelope; the renderer must cycle each character through random glyphs (A–Z, 0–9, symbols) for the entrance duration before locking to the final letter. Differs from decoder-on-stream-end which fires only when an AI stream finishes — this preset is a one-shot entrance, not stream-aware. Reuse the same scramble glyph pool across an app for consistency. Best on 1–6 word headlines, code identifiers, or status labels; avoid on body copy where the cycling reads as unreadable noise.

Inspired by Hacker UI scramble at page-load, security dashboards, code editor reveals, Mr. Robot terminals..