How to use it
- Pick a preset
Subtle, soft, layered, sharp or inset, or start from one plain layer.
- Tune each layer
Offset X and Y, blur, spread, colour, opacity and inset. Add up to six layers.
- Copy the CSS
One box-shadow declaration with every layer, ready to paste.
The box-shadow values
box-shadow: inset? x y blur spread colour. X and Y move the shadow right and down (negative values go left and up). Blur softens the edge; 0 gives a hard edge. Spread grows or shrinks the shadow before blurring, so a negative spread with a large blur gives a shadow that only shows below the element. inset draws the shadow inside the box, as if it were pressed in.
Why layered shadows look better
Real objects cast shadows that are sharp and dark close to the object and soft and light further away. One large blurred shadow cannot do both. Stacking several low-opacity layers, each with double the offset and blur of the one before, gets much closer to real light. The Layered preset does exactly that.
Shadows in dark mode
Dark shadows barely show on dark backgrounds. In dark themes, use a slightly lighter surface colour for raised elements, or a thin light border, instead of relying on the shadow alone. Set the preview background to your page colour to see how it will really look.
Need the exact colour code for your shadow? Convert it with the colour converter. Building a card with a gradient? Try the gradient generator.