Haedong
026

Scramble Text

Motion

Personal profile MCP

Move the cursor across the text

Customize

API

Code

<ScrambleText text="Personal profile MCP" />

Install

npx shadcn@latest add https://components.haedong.dev/r/scramble-text.json

Props

ScrambleText is a drop-in for a text node (this site's header, menu and labels use it). useScrambleChars gives the same characters plus moveAt / reset / decode for layouts that react as one, like the Log rows.

PropTypeDescription
textstringThe text. Each character renders in its own span; an sr-only copy keeps the accessible name stable.
classNamestringExtra classes for the wrapping span (whitespace-pre by default).
useScrambleChars(text).charsReactNodeRender where the text goes.
useScrambleChars(text).moveAt(clientX: number) => voidScramble the characters within 28px of the cursor for a few frames.
useScrambleChars(text).decode() => voidPlay the left-to-right decode once (landing).