CSS Box Shadow Generator

Stack shadow layers visually and copy the CSS or a Tailwind class.

DesignFreeNo sign-up
Loading tool…

Runs entirely in your browser — nothing you enter is uploaded or stored on a server.

How to use it

Build a box-shadow from several layers, the way a convincing shadow is actually made — a tight dark edge over a wide soft cast. Drag the offsets, blur, spread and opacity, preview on light and dark, and copy production CSS or an arbitrary-value Tailwind class.

  1. Start from a preset, or add layers one at a time.
  2. Select a layer and drag its offsets, blur, spread and opacity.
  3. Check it against the dark preview, then copy the CSS.
DesignersDevelopersFront-end engineers

Questions

Why use more than one shadow layer?

Real light casts a short dense shadow close to an object and a long diffuse one further out. One layer can only do one of those, which is why a single large blur tends to look like grey fog.

What does spread do?

It grows or shrinks the shadow before it is blurred. A negative spread pulls the shadow in so it peeks out below an element rather than haloing it.

What is an inset shadow?

A shadow cast inside the element instead of outside it — used for pressed buttons, wells and inputs.

Do shadows cost performance?

Large blur radii are expensive to paint, especially animated. Animate transform or opacity instead, and avoid transitioning box-shadow on a long list.