CSS Box Shadow Generator
Build CSS box-shadow visually with a live preview. Multiple layers, inset shadows, blur, spread, color picker. Copy the generated CSS ready to drop into a class.
How to use the CSS Box Shadow Generator
Each layer is one comma-separated shadow. Stack 2-3 layers for material-design depth (a soft larger shadow + a sharper smaller one). Inset reverses the shadow to live inside the box. Spread positive grows the shadow, negative shrinks it.
Designing depth with box-shadow
A single box-shadow rarely looks convincing. Real depth comes from layering: a large, soft, low-opacity shadow for ambient light plus a tighter, darker one close to the element for contact, which is exactly how material design elevation works. Each layer has an x and y offset, a blur, a spread, and a color, and shadows can be flipped inside the box with inset.
Stack as many layers as you like here, with soft, sharp, and stacked presets to start from, and copy the comma-separated rule. Pair the result with the border-radius generator to round the same box, or use the text-shadow generator when the glow belongs on type rather than a container.
Common use cases
- Card elevation — layer two shadows for a believable lifted card.
- Buttons — add a subtle drop shadow that deepens on hover.
- Inset wells — use an inset shadow to sink an input or panel.
- Focus rings — build a soft glow with a spread-only shadow.
- Material depth — match a design system's elevation levels.