Six controls, one declaration
The generator writes a single CSS box-shadow rule from an X offset, a Y offset, a blur radius, a spread, an opacity and a colour, with an optional inset flag. Sliders run from -50 to 50 for the offsets, 0 to 100 for blur, -20 to 20 for spread and 0 to 100 per cent for opacity. The defaults produce box-shadow: 0px 4px 6px 0px rgba(0,0,0,0.3); and the white preview square updates as the sliders move.
A worked example
An X of 2, a Y of 8, a blur of 24, a spread of -4, an opacity of 15 per cent and the colour #1e3a8a give box-shadow: 2px 8px 24px -4px rgba(30,58,138,0.15);. Ticking inset prepends the keyword, so the same values become box-shadow: inset 2px 8px 24px -4px rgba(30,58,138,0.15);. The hex colour is converted to decimal channels, since 1e is 30, 3a is 58 and 8a is 138.
What the preview cannot show
The preview square is white with an 8 px radius applied by the same script, so a shadow tuned against it will look different on a dark card or a sharp corner; tune the corners with the border radius generator. Every value is a whole pixel, with no rem, percentage or negative blur, and the copied rule is one layer whose colour always leaves as rgba rather than the hex that was picked.
Where it stops
- One shadow layer, so stacking several means merging the rules by hand.
- No presets, no transition between states and no hover or focus variants.
- Opacity is written as a bare decimal, so 30 per cent appears as 0.3 and zero as rgba(0,0,0,0).
- The copy button gives no confirmation and fails without clipboard access.
Questions people ask
Why does the shadow look different on a real page?
Because a soft shadow depends on the surface behind the element and on its size and radius. The preview is a 128 px white square, so a shadow that reads as subtle there can vanish on a white page or look heavy over a coloured one.
Can I get a text shadow instead?
Use the text shadow generator, which takes similar values and applies them to type. For a backdrop behind the box, the gradient generator is the other half.