CSS Box Shadow Generator
Stack shadow layers visually and copy the CSS or a Tailwind class.
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.
- Start from a preset, or add layers one at a time.
- Select a layer and drag its offsets, blur, spread and opacity.
- Check it against the dark preview, then copy the CSS.
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.