CSS Box Shadow Generator
Build CSS shadows with sliders for offset, blur, spread, color, and opacity. Live preview, multi-shadow stacking, copy as CSS or Tailwind.
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.08);
shadow-[0px_4px_16px_0px_rgba(0,_0,_0,_0.08)]
01 — Overview
How the CSS Box Shadow Generator works
Compose box shadows visually. Stack multiple layers, tweak offset, blur, spread, color, and opacity for each, and watch the preview update live. Output as plain CSS or as a Tailwind arbitrary value. Common shadow presets are one click away.
02 — Use cases
When to use the CSS Box Shadow Generator
- 01
Find the right elevation for a card without 5 minutes of trial and error
- 02
Build a layered shadow that doesn't look like a default Material drop
- 03
Translate a Figma shadow effect into CSS for production
- 04
Get the Tailwind arbitrary-value form of a custom shadow
03 — Examples
CSS Box Shadow Generator examples
soft elevation, 4px y-offset, 16px blur, 8% opacity
ex 01box-shadow: 0 4px 16px 0 rgba(0,0,0,0.08);
A subtle card-elevation shadow.
two-layer crisp shadow
ex 02box-shadow: 0 1px 2px rgba(0,0,0,0.05), 0 4px 12px rgba(0,0,0,0.08);
A near-surface highlight stacked with a softer ambient layer.
focus ring, 3px accent at 40% opacity
ex 03box-shadow: 0 0 0 3px rgba(163, 230, 58, 0.4);
Zero offset and zero blur turns box-shadow into a ring that ignores the layout box.
pressed state for a button
ex 04box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
An inset shadow along the top edge reads as the surface being pushed in.
04 — FAQ
Box Shadow — frequently asked questions
What is shadow spread?
Should I use inset shadows?
How do I avoid the 'AI default' shadow look?
How do I make a shadow that still reads in dark mode?
What's the difference between box-shadow and drop-shadow?
Do box shadows hurt performance?
05 — Reference
Specs and further reading
The primary sources this tool follows. Where behaviour is defined by a specification, we link the specification rather than a summary of it.
- box-shadow
MDN Web Docs — Reference for offset, blur, spread, inset, and multi-shadow syntax.
- CSS Backgrounds and Borders Module Level 3
W3C — The specification that defines how box shadows are painted and layered.
07 — More
Tools that pair with Box Shadow
Glassmorphism Generator
Visual builder for frosted-glass cards. Sliders for blur, opacity, saturation, border — copy CSS or Tailwind.
CSS Animation Generator
Build CSS @keyframes animations visually. Pick a preset or design your own — duration, easing, iteration. Live preview, CSS + Tailwind output.
Color Picker & Converter
Pick or paste a color, get every format — hex, RGB, HSL, OKLCH, CMYK, and the closest named color.