Build a box-shadow with sliders and copy the CSS. Offset, blur, spread, colour and opacity, plus inset for shadows that fall inside the box. Add as many layers as you like — and know that the first layer in the list paints on top of the ones below it, the reverse of a design tool's layer panel, which is the thing that trips people up. The presets are layered rather than single, because that is how convincing shadows are actually built: one tight shadow for the contact edge and a looser one for the ambient spread reads as a light source, where one large blur reads as a grey smear. The neumorphic preset shows the trick of pairing a dark shadow with a light one on the opposite side.
| Part | Effect |
|---|---|
| Offset X / Y | Moves the shadow — implies light direction |
| Blur | Softens the edge; 0 is a hard shadow |
| Spread | Grows or shrinks before blurring; negative pulls it in |
| Colour with alpha | Almost always partly transparent black |
| inset | Draws inside the box instead of outside |
In order: horizontal offset, vertical offset, blur radius, spread radius, then the colour. Offsets move the shadow, blur softens its edge, and spread grows or shrinks it before blurring — a negative spread is how you pull a shadow in so only the blur shows.
The first one. Box-shadow paints its layers front to back, so the first in the comma-separated list covers the ones after it. This is the opposite of a design tool's layer list, and it is a common source of confusion when a shadow refuses to show.
Because real shadows are not one blur. A tight, dark shadow near the element gives the contact edge, and a wider, fainter one gives ambient spread. Together they read as a light source; a single large blur reads as a flat grey patch. Every mature design system does this.
Draws the shadow inside the element instead of outside, which makes the box look recessed rather than raised. Useful for pressed buttons, input fields and inlaid panels.
A static one, no. Animating blur or spread does, because the browser has to repaint the shadow every frame. If you need a shadow to change on hover, animating opacity on a second element with a pre-rendered shadow is far cheaper.
Because it is zero, and a zero spread changes nothing. It is omitted so the copied CSS looks like what you would write by hand. Set any non-zero value and it appears.
Multiple shadow layers are comma separated, and the paint order is the detail worth knowing: the first layer in the list renders on top of the ones after it, which is the reverse of how a layer panel in a design tool behaves and catches people out constantly. The interface says so rather than leaving it to be discovered. A zero spread is omitted from the output because the property is positional — omitting a trailing zero changes nothing, and hand-written CSS does not carry it. Zero offsets are written bare rather than as 0px for the same reason. Colours are held as rgba so opacity is a first-class control; the colour input itself only speaks hex, so the value is decomposed and reassembled around the alpha rather than losing it on every edit, which is the usual bug in a generator that mixes a hex picker with an alpha slider. The layered presets are built the way real design systems build them — two or three shadows with different blurs and negative spreads, because a single large blur reads as a flat grey smear while stacked shadows with tight and loose layers produce the impression of a light source. The neumorphic preset pairs a dark shadow with a light one on the opposite side, which is the entire trick behind that style.