Text✨ Premium

Neon Flicker

Pure-CSS neon text: five white and colored text-shadow layers flicker at irregular intervals to mimic the glow and instability of a real neon tube.

CSSNeonGlow

You'll get access to the interactive demo with a free account.

This effect is part of Effect.Labs — 811 vanilla effects, some free, some premium. Text has 56 effects, including 4 free. Explore the category →

3 usage examples

Storefront sign — Bar or concert venue landing page — Neon Flicker example 1

① Storefront sign — Bar or concert venue landing page

WhenAt the top of a nightlife venue's homepage, the venue name or the word 'NEON' rendered in the flickering neon style sets the atmosphere before the first scroll.
WhyRealistic flickering on large type reproduces the experience of a real illuminated sign on a facade — strong atmospheric impact without a bitmap image or video.
Settingsfont-size 5–8 rem on the heading, animation-duration 2 s for a slower and more organic rhythm, neon color adapted to the venue's identity (cyan #00e5ff for a techno bar, rose #ff2d78 for a trendy club).
Esports interface — Player rank or title — Neon Flicker example 2

② Esports interface — Player rank or title

WhenIn a player profile, end-of-match screen, or leaderboard, the current rank name (GOLD, DIAMOND, MASTER…) is rendered in neon to reinforce the sense of achievement.
WhyNeon aesthetics are native to gaming culture: they signal elite status without relying on a graphic asset. The effect costs zero image bytes and stays crisp at any screen resolution.
Settingsfont-size 2.5–4 rem, color matched to the rank (#ffd700 for gold, #b9f2ff for diamond, #c84b3f for master), animation-duration 1.2 s for a faster and more tense flicker.
Digital poster — Artist name or festival title — Neon Flicker example 3

③ Digital poster — Artist name or festival title

WhenOn a ticketing page or promotional asset, the artist or festival name is rendered as a neon sign on a dark background to anchor the event's visual identity.
WhyThe flicker reinforces visual hierarchy without an image — ideal for dynamically generated thumbnails (OG image, personalized poster by date or venue).
Settingsfont-size 3–6 rem, condensed or bold sans-serif font-family for impact, letter-spacing 0.05–0.12 em to open up the type, warm neon (#ff6600) or festival pink (#ff2d78), animation-duration 1.8 s.

How it works

The effect relies on five stacked text-shadow layers, all centered (0, 0 offset) but with increasing blur radii. The first two (10 px, 20 px) use white #fff to form the luminous core of the tube; the next three (30 px, 40 px, 70 px) apply magenta #ff00de for the colored outer bloom. The accumulation creates the light saturation characteristic of real illuminated fluorescent glass.

The flicker is produced by @keyframes neonFlicker: text-shadow is cut to none only at the 20%, 24%, and 55% stops. Each blackout spans exactly 1% of the animation duration — long enough to register as a flicker, short enough not to read as a fault. The total 1.5 s duration produces roughly 40 flickers per minute, consistent with an aging real gas tube.

The alternate animation direction replays each cycle in reverse. Blackouts that fell at 20%, 24%, and 55% on the forward pass now land at 45%, 76%, and 80% on the return, doubling the pattern variety without adding a single keyframe. The result is a flicker that never repeats at exactly the same perceived cadence.

The effect is fully declarative: zero JavaScript, zero dependencies. The text-neon-flicker class applies to any HTML text element — h1, span, p, button — without modifying the markup or loading additional files.

Accessibility

  • prefers-reduced-motion not handled: the code contains no @media (prefers-reduced-motion: reduce) block. The animation runs on all devices, including those configured to reduce motion. For accessible projects, add: @media (prefers-reduced-motion: reduce) { .text-neon-flicker { animation: none; } }
  • Text remains readable when the glow disappears: color: #fff is maintained at all times, independent of text-shadow. Against a dark background (#0a0a0f), the white/background contrast ratio is ≥ 7:1 — WCAG AAA without the effect.
  • The animation is infinite and starts automatically, with no pause button in the default markup. WCAG 2.2.2 recommends a pause mechanism for any auto-started animation lasting over 5 seconds; add a button toggling animation-play-state: paused if the text is a primary foreground element.
  • No ARIA attributes are defined in the base markup. If the text element serves as a logo or graphic heading, add role="img" and aria-label for screen readers.
  • Keyboard navigation: the default markup contains no interactive elements. If you wrap the neon text in a link or button, verify the :focus-visible contrast ratio against the dark background.

Browser compatibility

Uses only CSS text-shadow and @keyframes — natively supported in all modern browsers without vendor prefixes.

Chrome 88+✓ Full
Firefox 87+✓ Full
Safari 15+✓ Full
Edge 88+✓ Full
Mobile iOS✓ Full
Android Chrome✓ Full

Without CSS animation support, the text is displayed in white (<code>color: #fff</code>) with the glow frozen at the initial state defined in <code>.text-neon-flicker</code>. No errors, no readability regression.

The code

HTML structure to paste into your page (CSS + JS available with a premium account):

index.html — structure
<div class="demo-preview">
  <!-- Apply text-neon-flicker to any text element -->
  <span class="demo-text text-neon-flicker">NEON</span>
</div>
🔒 Unlock the full code — from €2.99 the first month

Full HTML + CSS + JS, copy-paste ready — with hundreds of premium effects.

Customize

Options passed to the API or data-* attributes:

Option / propertyDefaultEffect
#ff00de (neon color) Magenta #ff00de Replace this value at all 3 occurrences: in both active blocks of @keyframes neonFlicker and in the text-shadow property of .text-neon-flicker. Try cyan #00e5ff, green #39ff14, or orange #ff6600.
#fff (inner glow) White #fff The first two text-shadow layers (10 px, 20 px) form the luminous core. Switch to pale yellow (#fffde0) for a warm tube, or light cyan (#cffafe) for a cold one.
animation-duration (1.5s) 1.5s Duration of one full cycle. 1 s = fast, tense flicker; 2–3 s = slow, atmospheric rhythm. Modify in the animation property of .text-neon-flicker.
text-shadow spreads (10px 20px 30px 40px 70px) 10 20 30 40 70 px The five blur radii control halo intensity. Reduce (5 10 15 20 40) for a subtle neon; increase (15 30 50 70 120) for a fully saturated full-screen glow.
Flicker stops in @keyframes (20%, 24%, 55%) 20% 24% 55% The only three points where text-shadow is set to none. Move or multiply these stops to vary flicker cadence — a single stop at 50% gives one flash per half-cycle.
font-size on .demo-text (2.5rem) 2.5rem Adjust to context: 1.5 rem for a compact badge, 6–10 rem for a full-screen sign. The text-shadow effect scales automatically with font size.
animation-play-state (running) running Set to paused via JavaScript (el.style.animationPlayState = 'paused') to freeze the animation on its last displayed state — useful for an accessible pause button.

FAQ

Replace #ff00de at three locations: in both active keyframe blocks inside @keyframes neonFlicker and in the text-shadow property of .text-neon-flicker. The two white inner layers (#fff at 10 px and 20 px) can stay as-is or be lightly tinted to warm or cool the overall atmosphere.
Not by default — the code contains no prefers-reduced-motion block. To fix this, add to the bottom of your stylesheet: @media (prefers-reduced-motion: reduce) { .text-neon-flicker { animation: none; } }. Text stays visible in white with a frozen glow — no readability regression.
Yes — any HTML element that renders text works: h1, h2, p, button, a… The text-shadow property applies regardless of the tag. One constraint: the background behind the element must be dark for the luminous halo to be perceptible — against a white background the effect is invisible.