Thinking UI

Scramble TextPRO

A status label that decodes out of random glyphs, then re-scrambles into the next action.

Code

1 file · 199 lines of TypeScriptPRO

Scramble Text is part of Pro

Get its source, the one-paste agent prompt and all 113 components, for a one-time $99.

Motion notes

  • Diff-aware: only characters that change scramble, and the decode wave starts at the first changed character, so 'Reading files' to 'Reading tests' only churns the last word.
  • Letters lock left to right with a little random jitter; when the new label is shorter, the old tail erases right to left like a backspace, so the text never collapses mid-word.
  • With loop on, a run of 1 to 3 characters glitches every second or two while active: a long 'Thinking' never looks frozen. Glitches pause while the label is off screen.
  • Frames write straight to the DOM, not React state. Screen readers get the real label in a polite live region; the glyph churn is aria-hidden. Reduced motion swaps labels instantly.

Usage

Example
<p className="flex items-center gap-2 font-mono text-sm">
    <span>✻</span>
    <ScrambleText label={status} loop active={!done} />
  </p>

Props

PropTypeDefaultDescription
labelstring—The status to show. Changing it re-scrambles into the new text.
activebooleantrueWhether the agent is still working. Idle glitches only run while active.
loopbooleanfalsePeriodically re-scramble a few characters while active.
glyphsstring"!<>-_\\/[]{}=+*^?#%&$01"Characters cycled through before each letter locks. ASCII stays inside the mono font.
speednumber1Playback multiplier. 2 decodes twice as fast.
classNamestring—Classes for the wrapper. Locked letters inherit its color; scrambling ones use text-fg-muted.