Glitch Text
グリッチテキスト
Three copies of the same word stacked on top of each other. The readable one stays put; the two behind it walk the same skew↗↗ and offset path in opposite directions on an endless loop, so the word appears to tear apart and reassemble without ever becoming unreadable. The original leaned on saturated colour to sell the channel split — here the ghosts are two greys, which turns out to be all the effect needed. Three intensities set the amplitude and the loop length; paused freezes it. Adapted from Kokonut UI↗↗ under the MIT licence.
Installation
Install the following dependencies:1
npm install framer-motionCopy and paste the following code into a new component file:2
How to use it3
Props
GlitchText
| Name | Default | Description |
|---|---|---|
| text | — | string The word to break up |
| intensity | "medium" | "light" | "medium" | "heavy" How far the ghosts travel and how fast the loop runs |
| size | 48 | number Font size in pixels |
| paused | false | boolean Hold the ghosts at rest |
| dark | false | boolean Render the dark palette |