CSS Box Shadow Generator

Adjust shadow layers, offsets, blur, spread, color, and opacity in a live preview, then copy the CSS declaration.

Preview
Box Color
Background
Radius 16px
CSS Output
box-shadow: 0px 10px 15px -3px rgba(0, 0, 0, 0.10),
0px 4px 6px -2px rgba(0, 0, 0, 0.05);

Shadow Layers

Layer 1
0x 10y 15b -3s
Options
#000000
Layer 2
0x 4y 6b -2s
Options
#000000

How CSS box-shadow layers work

A single box-shadow declaration can contain multiple comma-separated shadows. Layering is optional: use one shadow for a simple outline or elevation, and add layers when you want to combine different offsets, blur, spread, or opacity.

Multi-layered Shadows

Shadow layering combines multiple shadows with different offsets, blur, spread, and opacity. It can create a softer or more complex effect than one shadow, but the right values depend on the element and surrounding design.

Understanding Spread vs Blur

A common mistake is treating Blur and Spread equally. Blur controls the feathering on the edges of the shadow. Spread controls the physical expansion (or contraction, if negative) of the shadow's mask overall. To create an "elevation" effect without a bulky halo, front-end developers often use a negative spread coupled with a high blur.

Frequently Asked Questions

How do you make smooth CSS shadows?

Smooth CSS shadows are created by layering multiple `box-shadow` declarations together. Instead of one harsh shadow, you combine several shadows with varying opacities, blurs, and offsets to mimic real physical light dissipation.

Can I copy the shadow CSS to Tailwind?

The copied value is a standard CSS box-shadow declaration. In Tailwind, add it using the configuration approach supported by your installed Tailwind version, or use an arbitrary shadow utility when its syntax fits the generated value.