About the CSS Box Shadow Generator
The CSS Box Shadow Generator creates the box-shadow property for cards, buttons and modals. Set the horizontal and vertical offsets, blur radius, spread, colour and opacity, and switch between outer and inset shadows. The colour is output as rgba() so the shadow blends naturally.
How to use the CSS Box Shadow Generator
- Adjust the offsets, blur and spread.
- Choose the shadow colour and opacity.
- Choose outset or inset.
- Copy the CSS.
Example
Soft card shadow
box-shadow: 0px 10px 30px -5px rgba(0, 0, 0, 0.3);A negative spread keeps the shadow tucked under the card.
Frequently asked questions
What does spread do?
Positive spread makes the shadow larger than the element; negative makes it smaller.
Do shadows slow pages down?
Large blurred shadows on many elements, especially during animations, can affect performance on low-end devices.
Can I add several shadows?
Yes, separate them with commas in your CSS for layered effects.