Neon Text
Text rendered as a glowing tube sign, with optional power-on flicker.
Installs motion.
open late
noodles · karaoke
Installation
npx shadcn@latest add https://neonkit.heyaadi.com/r/neon-text.jsonUsage
import { NeonText } from "@/components/ui/neon-text"
<NeonText as="h1" color="magenta" buzz>open late</NeonText>Examples
Power switch
Flip on to replay the power-on flicker. Off leaves the glass tube visible.
Colors
API reference
| Prop | Type | Default |
|---|---|---|
as | "span"Element to render. | "span" |
color | NeonColorTube color. | inherited |
on | booleanLit or dark. Turning it on replays the flicker. | true |
flicker | booleanLetters stutter on one at a time when lit. | true |
buzz | booleanA random letter buzzes every few seconds. | false |
Accessibility
- String children are split into letters for the flicker; screen readers get the whole word once.
- Flicker and buzz are skipped when the user prefers reduced motion.
- Only a plain string is split into letters. Other children light as one piece, without the letter-by-letter flicker.
- The glow is sized in em, so it stays in proportion from a caption to a headline.