Glitch Text
RGB-split text with slice jitter, in bursts or on hover.
SIGNAL LOST
Relay 07 dropped out. Retrying in 00:30
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/glitch-text.jsonUsage
import { GlitchText } from "@/components/ui/glitch-text"
<GlitchText as="h1" intensity="heavy">SIGNAL LOST</GlitchText>Examples
Intensity
Inside a link
trigger="hover" also answers to the link or button around it, so keyboard focus sets it off too.
In view
One burst each time it scrolls into view.
API reference
Also accepts native attributes for the element it renders.
| Prop | Type | Default |
|---|---|---|
as | "span"Element to render. | "span" |
trigger | "hover"Glitch while hovered (or while a surrounding link or button is hovered or keyboard-focused), in periodic bursts, once per scroll into view, or while active. | "always" |
active | booleanWith trigger="manual", glitches while true. | false |
intensity | "subtle"How far the slices jump. Medium adds a skew; heavy also tears a band out of the text. | "medium" |
color | NeonColorFirst split layer. Falls back to --neon-accent, then cyan. | inherited |
colorAlt | NeonColorSecond split layer. Defaults to the neon hue turned 150°, so it always contrasts. | None |
Accessibility
- The text is rendered once for screen readers; the two colored copies are aria-hidden.
- Bursts are skipped entirely under reduced motion, leaving plain text.
- The base text keeps its inherited color, so it reads as normal copy between bursts.