Skip to content
English
Scramble text comes with Pro. Its preview shows once you unlock it.

How it works

Each character is an inline box sized by its final glyph. While it churns, the final glyph turns transparent and a random one is centred over it in a lighter accent colour, so the line never reflows and the eye reads it as working. Settle times follow the reading order with a seeded jitter, so the text resolves as a soft wave and the same way every time; settling is a hard cut, crisp like a split-flap board. Glyphs change every 45ms rather than every frame, which reads as deliberate instead of noisy.

Use it for

  • Short headings or labels in technical, security or launch contexts.
  • Links and menu items that should react to hover with character.

Look elsewhere when

  • Body text or anything longer than a line or two.
  • Long passages in Chinese or Japanese: wide characters churn through narrow glyphs, so keep it to short headings there.

Usage

import { useState } from 'react'
import { ScrambleText } from './ScrambleText.jsx'

export function ReleaseHeading() {
  return <h2><ScrambleText text="Faster builds, fewer surprises" trigger="view" /></h2>
}

// Drive it from a parent, such as a whole link row
export function LinkRow({ label }) {
  const [play, setPlay] = useState(0)
  return (
    <a href="/changelog" onPointerEnter={() => setPlay((p) => p + 1)} onFocus={() => setPlay((p) => p + 1)}>
      <ScrambleText text={label} trigger="none" play={play} />
    </a>
  )
}

Props

PropTypeDefaultWhat it does
textstring—Final text.
trigger'view' | 'hover' | 'mount' | 'none''view'When it scrambles: entering the view (once), pointer enter or focus inside, on mount, or only through play.
playany—Any change replays it, such as a counter.
durationnumber900Time until the last character settles, in ms.
charset'letters' | 'symbols' | 'digits' | 'binary' | string'letters'Glyphs to churn through, or your own string.
ticknumber45Milliseconds between glyph changes.
asElementType'span'Element to render.

Accessibility

  • The final text sits in a visually hidden span, so screen readers read it once and never hear the random glyphs; the animated characters are aria-hidden.
  • Hover triggers also fire on focus inside, so keyboard users get the same effect.
  • The animation is short (under a second by default) and does not repeat on its own.
  • Reduced motion skips the scramble entirely; the final text is always shown.

Motion

Glyphs change every 45ms; characters settle over the duration (900ms by default), 70% by position and 30% by a seeded jitter.

Add it to your project

Pro members copy a prompt and their coding agent installs the source, the same way as the free components.

ScrambleText.jsxscramble-text.csstokens.cssREADME.md

Both files install together. The stylesheet reads the design tokens in tokens.css and carries fallbacks, so it also works alone.

Text motion
Morphing text comes with Pro. Its preview shows once you unlock it.