Measured entry
motion-primitives-text-scramble
text-effectdark-futuristicmotion on file
A client-side React text effect that replaces unrevealed characters on a timer, then resolves them to the supplied string. It ships as a shadcn registry TypeScript component, imports motion/react, and relies on React state and effects. It accepts a custom element, character set, timing controls, a trigger, and a completion callback.



Measured
Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.
| Build | OK |
|---|---|
| Mount | OK |
| Console errors | 0 |
| Uncaught page errors | 0 |
| Horizontal overflow | clean at 375, 768, 1440 |
| Axe critical | 0 |
| Axe serious | 0 |
| Axe moderate | 0 |
| Axe minor | 0 |
| Gzip marginal | 58.3 KB (123.7 KB build, 65.4 KB baseline) |
| Bare mode | OK |
| Provider required | NO |
| Demo used | written from the component source API |
Verdict
A compact, configurable scramble effect that builds and mounts cleanly without framework scaffolding. It is a good fit for occasional decorative reveals, but teams should add reduced-motion handling and avoid treating it as a general solution for text that changes after mount.
Use it if
- You need a short decoding or terminal-style reveal for a heading, status, or one-line label.
- Your React interface already uses Motion or can justify adding it for this and other animation work.
- You want to restart the effect from application state and run logic when the reveal completes.
Skip it if
- The text changes frequently while the trigger remains active, because child updates do not restart or synchronize the displayed value.
- You need built-in reduced-motion behavior rather than adding that preference handling around the component.
- You want a dependency-free text effect or cannot justify Motion for a small decorative interaction.
- The changing text sits in a live or frequently announced region where rapid character updates could distract assistive technology users.
Install
| Declared dependencies | motion |
|---|---|
| Missing on install | none |
| Bare install | builds and mounts without the shadcn-style helpers |
| Provider | no provider required in the harness |
In a non-shadcn React project, install Motion, copy the component into your source tree, and keep it behind a client boundary where the framework requires one. No provider, theme variables, or registry helper utilities are required. Add your own reduced-motion policy and styling through the rendered element or class name.
Source and credit
This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.
Author repository
github.com/ibelick/motion-primitivesAlternatives
Other published entries for the text-effect pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.
- uilayouts-randomized-text-effectdark-futuristic
- Renders
- YES
- A11y
- 0
- Gzip
- 17.5KB
- Bare
- pass
- Prov
- NO
- uilayouts-randomized-text-unveildark-futuristic
- Renders
- YES
- A11y
- 0
- Gzip
- 17.7KB
- Bare
- pass
- Prov
- NO
- fancy-scramble-indark-futuristic
- Renders
- YES
- A11y
- 0
- Gzip
- 17.8KB
- Bare
- pass
- Prov
- NO
- magicui-aurora-textaurora-mesh
- Renders
- YES
- A11y
- 0
- Gzip
- 20.7KB
- Bare
- pass
- Prov
- NO
- magicui-highlighterskeuomorphism
- Renders
- YES
- A11y
- 0
- Gzip
- 24.8KB
- Bare
- pass
- Prov
- NO
- fancy-text-along-pathspatial
- Renders
- YES
- A11y
- 0
- Gzip
- 25.7KB
- Bare
- pass
- Prov
- NO