CSS Box Shadow Generator: Tailwind, Neumorphism & Glass

CSS Box Shadow Generator: Tailwind, Neumorphism & Glass

Create CSS box shadows with a live preview and ready-made presets, or switch to neumorphism and glassmorphism. Copy as CSS, a Tailwind class or a variable.

Updated November 2026

Reviewed by Rafael Duarte

Core Parameters
10px
10px
20px
0px
0.15
Inset Shadow
Export Code
CSS
box-shadow: 10px 10px 20px 0px rgba(30, 41, 59, 0.15);
Tailwind Utility
shadow-[10px_10px_20px_0px_rgba(30,_41,_59,_0.15)]
CSS Variable
--shadow: 10px 10px 20px 0px rgba(30, 41, 59, 0.15);

Shift+Enter copies CSS

Live Preview
Featured Presets

How the CSS box shadow generator works

Visual sliders, three output formats

1. Adjust the sliders

Shift X, Shift Y, Blur, Spread and Opacity — the preview updates live as you drag.

2. Pick a mode or preset

Standard, Neumorphism, Glassmorphism — or click a ready-made preset from the gallery.

3. Copy CSS, Tailwind or a variable

Shift+Enter copies the CSS instantly from anywhere in the tool.

What this box shadow generator does

Three shadow styles in one generator

Automatic neumorphism

Calculates the two opposing shadows (highlight + shade) from whatever background color you choose.

Glassmorphism in context

Renders the preview over a colored gradient, including the -webkit- prefix Safari needs.

Triple export

Plain CSS, a Tailwind utility class, or a CSS custom property — copy whichever format your project uses.

Material Design presets

Ready-made elevation levels, plus iOS-style shadows, subtle cards and neon glows.

Dark preview in Standard mode

In Standard mode, the moon button swaps the preview to a dark background so you can check how a shadow reads on a dark UI. Neumorphism uses your chosen background and Glassmorphism its own gradient.

Four preview shapes

Test the same shadow on a card, a button, an input field or a circle before you copy it.

CSS box-shadow examples

Common values you can copy straight into your stylesheet

Effect
CSS value
Subtle card
0 1px 3px rgba(0,0,0,.08)
Material Design elevation 2
0 3px 6px rgba(0,0,0,.15), 0 2px 4px rgba(0,0,0,.12)
Neon glow (zero offset)
0 0 20px rgba(59,130,246,.5)
Inset shadow (pressed)
inset 0 2px 4px rgba(0,0,0,.06)

When you'll reach for this tool

The most common scenarios among people who use it

Material Design-style elevation

Start from a Material or Cards preset. Most of them stack a tight shadow and a diffuse one, which gives cards and surfaces a more realistic sense of depth.

Neon effect on buttons and badges

Zero offset with a high blur produces an ambient glow instead of a directional shadow.

Soft UI (neumorphism)

Cards and buttons with a soft, extruded look. Flat raises the element, Pressed sinks it with inset shadows, and Concave keeps the Flat shadows but fills the element with a subtle gradient.

Frosted glass cards

Glassmorphism over a colored background or image, with the correct fallback for Safari.

Common mistakes

Using box-shadow instead of drop-shadow for icons

box-shadow follows the element's rectangular box; drop-shadow traces the actual visual shape, including transparent PNGs.

Forgetting the -webkit-backdrop-filter prefix

Without it, the glassmorphism effect silently disappears on iOS and macOS Safari.

Animating box-shadow directly on hover

Triggers a repaint on every frame — animate opacity on a pseudo-element that already has the shadow applied instead.

Why use this box shadow generator

Standard shadows, neumorphism and glassmorphism live on one screen, with the same live preview and the same three export formats: plain CSS, a Tailwind class and a CSS variable. In Neumorphism mode you pick a background color and the tool derives the light and dark shadows from it.

The CSS it outputs is production-ready, with compatibility prefixes like -webkit-backdrop-filter already included.

box-shadow vs. filter: drop-shadow

Two ways to add a shadow, different purposes

box-shadow
filter: drop-shadow
Follows
the element's rectangular box
the actual visual shape (including PNG transparency)
Best for
cards, buttons, rectangular elements
icons and irregular shapes
Supports inset
yes
no

Frequently asked questions

It adds one or more shadow effects around an element's box — horizontal offset, vertical offset, blur, spread and color. Multiple shadows stack when separated by commas, with the first one rendered on top.

References

Related Tools