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

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component ScrambleTextDefault layout:inline style:scramble-text {
  label "Decode"
}

page "/audit/scramble-text/default" type:custom {
  use ScrambleTextDefault
}

API Reference

Generated from the component's exported types.

ScrambleTextProps

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

Skip ScrambleTextProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>—Ref forwarded to the underlying DOM node.
children*
string—The 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).
className
string—Additional class names merged onto the root.
id
string—DOM id of the root element.