Overview
Neon glow effects stack multiple text-shadow layers — a crisp white core, a colored halo, and a wide outer bloom — with only the opacity (or none of the layers) animating so the flicker reads as electrical, not pulsing. Three programs ship: a steady warm hum, a cyan signal pulse, and a violet stutter.
When to use it
Reach for neon glow on retro signage, hero headlines, gaming surfaces, and any product that wants a tactile light source rather than flat depth. Skip it on dense or pale backgrounds — the glow disappears against light surfaces and looks garish against busy ones. Skip it for accessibility-critical text where the flicker can compromise legibility.
How it works
The shadow stack is a comma-separated text-shadow with three or four progressively wider blur radii — 0 0 2px white, 0 0 8px var(--accent), 0 0 24px var(--accent), 0 0 56px var(--bloom). The tightest layer sits at the glyph edge as the “core”; the widest layer is the ambient bloom. The flicker animation targets opacity on the whole text node (or on a wrapper) so all layers attenuate together — animating individual blur radii instead would feel like the glow is pulsing rather than the lamp flickering.
Production gotchas
Multiple wide blur radii on text are expensive on lower-end mobile GPUs; cap the largest blur under 64px or the cost compounds across many neon elements. The flicker keyframe should jump between high and low opacity (not smoothly interpolate) for real neon character — use animation-timing-function: steps(2, end) or sharp keyframes for the on/off transitions. Layered shadows do not clip to padding or borders, so a neon button needs padding larger than the largest blur radius or the glow extends past the click target visibly.
Accessibility
Flicker rates above 3Hz can trigger photosensitive epilepsy — never set the flicker keyframe shorter than 333ms. Under prefers-reduced-motion: reduce pin the opacity at full so the neon stays steady — the static glow still communicates the “lit” aesthetic without any motion. Verify text contrast at minimum opacity for every glow color.
References
Implementation depth
Neon glow is a stack of small and large text-shadow layers, not one huge blur. The inner layer keeps the glyph edge sharp while outer layers create the sign-like halo.
Flicker should be rare and low amplitude. Constant opacity changes are tiring and can reduce contrast, so reduced motion should disable flicker and leave a stable glow that still meets readability expectations.