Skip to content
Premium & Brand

Scramble Text

Resolves a phrase by cycling random glyphs until it locks in.

Import

tsx
import { ScrambleText } from "@cronus-ui/ui";
bash
npx cronus-ui add scramble-text

Examples

API Reference

Generated from the component's exported types.

ScrambleTextProps

Extends Omit<HTMLAttributes<HTMLSpanElement>, "children">

Skip ScrambleTextProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>
children*
stringThe phrase to resolve to.
speed
number40Milliseconds between scramble ticks.
ticksPerGlyph
number4How many ticks each glyph stays scrambled before locking.
charset
stringDEFAULT_CHARSETGlyphs used while scrambling. Defaults to a Latin + digit set.
reducedMotion
ScrambleTextMotionPreference"respect"How `prefers-reduced-motion` is honoured. Defaults to `"respect"` (show the resolved phrase immediately).