20 CSS Neon Effects
A neon glow is layered light: a tight bright core, a mid halo, and a wide dim bloom — three stacked shadows where one large blur only reads as a coloured smudge. These 20 hand-coded patterns cover the glow anatomy, drop-shadow for irregular shapes, why some hues read as luminous and others muddy, inner-glow emission, animatable intensity with @property, SVG filter merges, the real paint cost, and keeping text legible against a dark ground. Scoped under .nn-NN; drops into React, Vue, Svelte, or Astro.
Related20 CSS Neon Text Effects15 CSS Glowing Border Buttons20 CSS Retro UI16 CSS Glitch Text Effects20 Tailwind CSS Grain Texture
Premium design systemPartner: Untitled UI
Affiliate linkTaking this style from one component to a whole product?
You just browsed 20 neon patterns. Untitled UI is the Figma UI kit 380,000+ designers use, with 10,000+ components and variants in Pro, plus a matching React library on Tailwind CSS. Figma Pro is a one-time purchase from $129.
Untitled UI. We may earn a commission, at no extra cost to you.
02. Drop Shadow Glow for Irregular Shapes (opens in a new tab)
box-shadow follows the element's border box, so a glow on a transparent image, an inline <svg> or a clip-path shape halos the rectangle instead of the artwork. filter: drop-shadow() follows the alpha channel instead. Both are applied to the same shape here, labelled, with the box version visibly wrong — plus what the swap costs you.03. Neon Color Choice and Perceived Luminance (opens in a new tab)
oklch().04. Inner Glow and Faked Light Emission (opens in a new tab)
inset shadows plus a bright core colour fakes emission on a tube, a bar or a panel edge. A tube built from inset layers sits beside one built only from outer shadows, both labelled, so the difference between a lit object and a light source is visible.05. Animating Glow Intensity with at-property (opens in a new tab)
--glow steps between values instead of easing between them — the single most common "why won't my neon pulse" question. Registering it with @property and a typed syntax makes intensity animatable independently of hue. The broken version sits beside the working one.06. Glow on SVG Paths and Stroke Elements (opens in a new tab)
filter: drop-shadow() on the element is simpler and inherits currentColor; a native <filter> with <feGaussianBlur> and <feMerge> allows a true multi-layer merge inside the SVG. One stroked route is lit both ways, labelled, including the filter-region trap that clips a glow at the edge.07. Neon Glow Paint Cost and What to Animate (opens in a new tab)
opacity on a pre-built glow layer composites instead. Both run side by side under a deliberate main-thread load, with a live frame counter, so the difference is measured rather than asserted.08. Accessible Neon on Dark Backgrounds (opens in a new tab)
09. Neon Glow Button Construction Reference (opens in a new tab)
10. Neon Heading and Display Type Glow (opens in a new tab)
11. Neon Pricing Table with Glow Tiers (opens in a new tab)
12. Layered Glow Scene with Depth Falloff (opens in a new tab)
13. Neon Form Inputs and Focus Glow (opens in a new tab)
<form> element — only :focus-visible, :has() and native validity.14. Neon Navigation with Active Glow State (opens in a new tab)
aria-current drives a weight change, a solid indicator bar and the light together, so the current page is identifiable with the glow removed, in forced-colours mode, or by anyone who cannot separate the two hues.15. Flicker Timing and Failing Tube Effect (opens in a new tab)
steps() for instant transitions and short dead intervals are what make a failing tube read as real instead of as a strobe. The timing is charted, the peak rate is stated, and the whole thing stays under three flashes per second because that limit is a seizure threshold.16. Cyberpunk Neon Palette and Token Set (opens in a new tab)
:has() on radio inputs, and the token table shows exactly what is derived from what.17. Tailwind Neon Glow Utility Recipe (opens in a new tab)
@layer utilities form and the v4 @theme form, with the rendered result built in plain CSS so it runs anywhere. Includes the part most recipes skip: why an arbitrary-value shadow is the wrong place for a glow, and how additive blending changes what the utility should contain.18. Neon Icon Glow with SVG Filters (opens in a new tab)
<filter>, defined once and referenced by every glyph. Covers the two things that bite at set scale — a filter id that has to be unique across the whole document, and the per-icon cost of a filter that is cheap on one glyph and expensive on twenty.19. Infinite Neon Grid and Perspective Floor (opens in a new tab)
20. Multi Hue Neon Gradient Glow (opens in a new tab)
box-shadows in different hues offset around the edges, and a blurred gradient layer sitting behind the panel. Both are labelled with what they cost and where each one wins.Frequently asked questions
How do you make a neon glow effect in CSS?
0 0 48px cyan — spreads the same light evenly and reads as a coloured smudge, because real emitted light does not fall off linearly. Three tiers do read as light: a tight, almost-opaque core at small blur that says where the light comes from; a mid halo at roughly half the core's alpha and three times its blur, which carries the falloff; and a wide, very dim bloom that suggests light spilling into the surrounding air. The same principle applies whether you are using box-shadow on a box or text-shadow on type. The one rule that governs all of it is that glow only reads as light against a dark ground — the effect is additive brightness, and on white there is nothing left to add. Demo 01 renders the one-layer and three-layer versions side by side with every value annotated.Why does my glow look like a rectangle around a transparent image?
box-shadow follows the element's box, not its visible pixels. Applied to a transparent PNG, an inline SVG icon, or anything cut with clip-path, it draws a halo around the bounding rectangle while the artwork inside floats unlit. filter: drop-shadow() solves it by following the alpha channel instead, so the glow traces the actual silhouette. Two costs come with that. drop-shadow is more expensive than box-shadow, and stacking three of them to build the layered effect compounds it, so keep the stack shallower on anything animated. And because it is a filter, it establishes a containing block for fixed-position descendants, which occasionally surprises people who have a positioned child inside the glowing element. Demo 02 shows both applied to the same clipped shape with the box-shadow version visibly wrong.Why do some neon colours look bright and others look muddy?
oklch() makes that practical because its lightness channel is perceptually uniform, so equal L values across hues actually look equally bright. Demo 03 applies one shadow recipe across eight hues, labels the failures, then shows the corrected version.How do I animate a neon glow without tanking performance?
box-shadow or filter repaints the entire blurred area on every frame. Build the glow once on a dedicated layer, then animate that layer's opacity or transform, which composites instead of repainting. The other half of the answer is that an unregistered custom property cannot interpolate at all — animating --glow silently does nothing, which is the most common reason a pulse appears not to work. Registering it with @property and a typed syntax makes intensity animatable independently of hue, so a pulse can brighten without shifting colour. Demo 07 races both approaches under a deliberate main-thread load, and demo 05 shows the silent no-op beside the registered version.Is neon text accessible?
prefers-reduced-motion by stopping the animation without dimming the text, so reduced motion never becomes reduced legibility. Demo 08 shows a failing heading with a live contrast readout beside the corrected version.Is a flickering neon sign safe to ship?
steps() for the abrupt on-off transitions and a few very brief dead intervals where the tube fails entirely. Even paced, an evenly blinking sign both looks fake and approaches the limit faster. The flicker in this collection runs at roughly 1.8 flashes per second, comfortably inside the threshold, and is fully disabled under prefers-reduced-motion. Demo 15 documents the timing directly.Does neon work on a light background?
How is this different from the neon text and glowing button collections?
css-neon-text-effect (20 demos) owns neon applied to type: flickering signs, synthwave headings, glitch text, gradient flow, the Tailwind text-glow utility, and typing terminals. css-glowing-border-buttons (15 demos) owns glow applied to buttons and borders as components: rotating gradient borders, cyberpunk corner treatments, breathing pulses. If you are asking why your glow looks like a smudge, why it haloes a rectangle around your icon, or why your palette went muddy when you recoloured it, you are in the right place. If you want a finished neon headline or a glowing CTA, the other two are the faster route.Related collections
20 CSS 3D Effects
20 hand-coded CSS 3D patterns covering the transform pipeline reference build, the perspective property versus the perspective function, perspective-origin as the camera position, why transform function order changes the result, backface-visibility on two sided elements, what silently flattens preserve-3d, building a cube from six faces, transform-origin in three dimensions, translateZ versus scale for depth, z-fighting on coplanar surfaces, rotate3d and the transform matrix, plus ring layouts, stacked z-planes, pointer tilt with parallax, a hinged page-turn flipbook, a drag-rotate cube navigator, an extruded synth panel, perspective floor geometry, nested 3D contexts, and helix distribution. 14 demos are pure CSS; 6 use vanilla JavaScript.
22 CSS Brutalism
22 hand-coded brutalist and neubrutalist CSS designs covering the full spectrum of the aesthetic — from the anti-design brutalism of 2014-2018 (raw system fonts, zero border radius, monochrome density, visible structure) through to the neubrutalism of 2021-present (bright pastel fills, thick black borders, hard offset shadows with zero blur, rounded blocks). The neubrutalist half ships SaaS pricing cards with sticker badges, a pastel admin dashboard, signup forms, rotated feature cards, an offset-shadow navbar, a playful button set, a native dialog modal, a testimonial wall, blog cards, chunky toggles, a landing hero, an image gallery, stats panels and a rounded footer. The brutalist half covers product grids, raw form controls, a monochrome data dashboard, a portfolio index, indie SaaS pricing, Windows 95 desktop chrome, editorial long-read and a streetwear catalog. Every design is scoped under a .brt-NN prefix for no-collision pasting, guards prefers-reduced-motion, and ports unchanged to React, Vue, Svelte, Astro, Next.js and Tailwind.
20 CSS Claymorphism
20 hand-coded CSS claymorphism designs covering the three-layer shadow recipe that defines the style, inner highlight and inner shadow layering, the border radius scale that makes shapes read as puffy rather than merely rounded, claymorphism compared side by side with neumorphism, a clay and glassmorphism hybrid, single light-source discipline across a layout, depth tiers for visual hierarchy, a Tailwind implementation with both arbitrary values and theme tokens, squishy button press states, toggles and checkboxes, inset input wells and search bars, badge and pill systems, cards, popover-based modals, pricing tables, mobile tab bars, app icon grids, toast and alert bubbles, dark mode shadow recalibration, and the paint cost of animating shadows. 19 demos are pure CSS; 1 uses vanilla JavaScript.


















