CSS Box Shadow Generator
Set the offset, blur, spread, colour and opacity, preview the shadow on a card and copy the box-shadow line.
Set the offset, blur, spread, colour and opacity, preview the shadow on a card and copy the box-shadow line.
The box-shadow property draws a shadow around an element. It takes a horizontal and vertical offset, a blur radius, an optional spread, and a colour.
Change the sliders' values, watch the preview card update, then copy the finished line into your stylesheet.
box-shadow: 0px 8px 24px 0px rgba(0, 0, 0, 0.25);
Spread grows or shrinks the shadow before the blur is applied. A positive value makes it larger than the element, a negative one makes it smaller.
Use a negative spread together with an offset. For example, a bottom-only shadow uses a positive vertical offset and a negative spread of the same size.
Yes, CSS allows several shadows separated by commas. Generate each one here and join them in your stylesheet.
Inset draws the shadow inside the element's border instead of outside. It is often used for pressed buttons and input fields.
Very large blurs on many elements, or on elements that animate, can cost performance. Keep blur moderate and avoid animating box-shadow on long lists.