Scramble
Text resolving out of glyph soup, left to right. On mount, on hover, or when it scrolls into view.
pulls in@afterglow/use-reduced-motion
34ms a step
keyA93F-77C1-0E4B
hostnode-04.afterglow
stateDECRYPTED
Installation
npx shadcn@latest add @afterglow/scrambleAPI Reference
The finished string is in the accessibility tree the whole time, and selecting the element copies the value rather than the glyphs.
hover runs on pointer entry only. There is no keyboard equivalent; reaching it with a keyboard shows the resolved text.
Scramble
Resolves text out of random glyphs, left to right. speed is milliseconds a step and rate is characters resolved per step, so the two together set how long the whole string takes.
| Prop | Type | Default |
|---|---|---|
| text | string | - |
| trigger | "mount" | "hover" | "view" | "mount" |
| speed | number | 34 |
| rate | number | 0.55 |
| charset | string | the teletype set |