How to Build CSS Box Shadow

Create CSS box shadows visually with a live preview. Adjust offset, blur, spread, color, and inset. Copy production-ready CSS code instantly.

Open Box Shadow Generator →

Step-by-Step Guide

1

Adjust shadow offset

Set the horizontal (X) and vertical (Y) offset to control where the shadow falls. Positive X moves right, positive Y moves down. Start with 4px 4px for a subtle effect.

2

Set blur and spread

Increase blur radius for a softer shadow (10-20px is common). Adjust spread to make the shadow larger or smaller than the element. The live preview updates instantly.

3

Pick shadow color

Choose a shadow color — most designs use semi-transparent black (rgba(0,0,0,0.15) to rgba(0,0,0,0.3)). You can also use colored shadows for creative effects.

4

Copy the CSS

Click "Copy CSS" to grab the complete box-shadow property. The generated code includes the standard property and works in all modern browsers.

Try It Now — Free

No signup, no download. Runs entirely in your browser.

Open Box Shadow Generator

Frequently Asked Questions

What is box-shadow in CSS?
box-shadow adds shadow effects around an element. The syntax is: box-shadow: offset-x offset-y blur spread color. You can add multiple shadows separated by commas for layered effects.
Can I stack multiple shadows?
Yes. Separate multiple shadow values with commas: box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1). Layered shadows look more natural and are used in Material Design.
What is the inset keyword?
Adding "inset" creates an inner shadow instead of an outer one. Useful for pressed-button effects or recessed input fields: box-shadow: inset 0 2px 4px rgba(0,0,0,0.1).
Related Reference

CSS Flexbox Cheat Sheet

View Cheat Sheet →

More Guides