Skip to content

Scramble Text

Characters shuffle into place on hover, focus, or scroll.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import ScrambleText from "./ScrambleText";
export default function Example() {
return (
<ScrambleText
text={"MAKE SOME NOISE"}
duration={900}
characters={"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"}
trigger={"hover"}
color={"#eee7fa"}
scrambleColor={"#a78ce6"}
/>
);
}

Using Scramble Text

Use a short phrase that remains useful after the characters settle. characters defines the symbols used during the scramble.

Choose trigger to match the interaction and duration to control how quickly the final text appears. Keep text and scramble colours readable against the background.

Props

NameTypeRequiredDefaultDescription
textstringNo""Text to reveal. The accessible label always contains the complete text.
durationnumberNo900Reveal duration in milliseconds.
charactersstringNo"ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"Characters sampled while letters are unresolved.
triggerstringNo"hover"Use hover for pointer and keyboard focus, or view for one reveal on entering the viewport.
colorstringNo"currentColor"Final text colour.
scrambleColorstringNo"#8d82ba"Colour of the unresolved characters.
classNamestringNo""Additional CSS classes, merged with the component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing and visual overrides.

Related components

Reflection Text

Text Effects

Crisp typography meets a soft, fading reflection beneath the baseline.

Morphing Words

Text Effects

Words dissolve through a soft blur while the headline keeps its width.

Dot Matrix Text

Text Effects

Amber pinpoints form a crisp matrix display with a soft travelling pulse.

Scan Text

Text Effects

A warm scanning light brings a dim headline into focus.