CSS soft box shadow

Make a soft CSS box-shadow: six real presets, why layered shadows look natural, and Tailwind.

loading CSS soft box shadow
About this tool

CSS soft box-shadow: how it works

box-shadow draws a shadow around the element's box. A value has up to five parts: horizontal offset, vertical offset, blur radius, spread radius and color (and an optional inset keyword). What makes a shadow soft is a large blur with a low-opacity color and a small vertical offset, so that the shadow looks like ambient light. The generator opens on the "soft" preset and lets you stack several layers.

A real result

box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

Tailwind:

shadow-[0_4px_12px_rgba(0,_0,_0,_0.15)]

Read it as: no horizontal offset, 4 px down, 12 px of blur, black at 15% opacity.

Why layered shadows look more natural

A real shadow is darker and sharper next to the object and fades out as it gets away. One blurred layer cannot do both; several layers, each double the offset and blur of the previous one, can. The "layered" preset has 5 of them:

box-shadow: 0 1px 1px rgba(0, 0, 0, 0.12),
    0 2px 2px rgba(0, 0, 0, 0.12),
    0 4px 4px rgba(0, 0, 0, 0.12),
    0 8px 8px rgba(0, 0, 0, 0.12),
    0 16px 16px rgba(0, 0, 0, 0.12);

The six presets

Presetbox-shadowLayersGood for
soft0 4px 12px rgba(0, 0, 0, 0.15);1cards and dropdowns at rest
layered0 1px 1px rgba(0, 0, 0, 0.12), 0 2px 2px rgba(0, 0, 0, 0.12), 0 4px 4px rgba(0, 0, 0, 0.12), 0 8px 8px rgba(0, 0, 0, 0.12), 0 16px 16px rgba(0, 0, 0, 0.12);5large panels: a natural fall-off
hard6px 6px 0 #141413;1retro, neo-brutalist buttons
innerinset 0 2px 8px rgba(0, 0, 0, 0.35);1inputs and pressed buttons
glow0 0 24px 4px rgba(255, 178, 36, 0.6);1highlights and focus rings
lifted0 18px 30px -12px rgba(0, 0, 0, 0.45);1a card hovering above the page

Common mistakes

  • A solid black shadow: use rgba or the opacity field. Real shadows are never fully black, and opaque ones look heavy and dirty.
  • Shadows in dark mode: a black shadow barely shows on a dark background. Lift cards with a lighter surface color or a faint border instead.
  • Animating box-shadow on hover for many elements: each frame repaints. Put the shadow on a pseudo-element and animate its opacity instead.
  • Expecting the shadow to follow rounded or clipped shapes: it follows border-radius but not clip-path; use filter: drop-shadow() for the latter.

How to use the generator

  1. The soft shadow is loaded; edit the offsets, blur, spread, color and opacity of each layer.
  2. Add layers, or pick another preset; the preview shows light and dark backgrounds.
  3. Copy the CSS or the Tailwind class.

Frequently asked questions

How do I make a soft shadow in CSS?

Use a large blur, a low opacity and a small vertical offset: box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15). For more realism stack layers, as in the "layered" preset.

What is the spread radius?

A positive value grows the shadow in every direction before the blur; a negative one shrinks it, which keeps a "lifted" shadow under the box and away from its sides.

Can I put several shadows on one element?

Yes, separated by commas; the first is on top. The generator writes one layer per line.

Report a problem