Box Shadow Generator
Design multi-layer CSS box-shadows interactively. Control every layer — offset, blur, spread, color, and inset — then copy the result as CSS or Tailwind. Everything runs in your browser.
Presets
Preview
Shadow layers
Output
0 4px 10px 0 rgba(0,0,0,0.25)How to use
Create a box shadow in four steps
- 1 Start from a preset or a blank layer
Click any preset in the gallery to load it instantly, or start from the default single layer and customise from there.
- 2 Adjust layer parameters
Expand a layer card to reveal the Offset X, Offset Y, Blur, Spread, Color, and Inset controls. Drag the sliders or type values directly — both update in real time.
- 3 Add more layers for depth
Click "Add layer" (or press Ctrl/Cmd+N) to stack shadows. Reorder them with the up/down buttons. Toggle layers on/off to compare effects.
- 4 Copy and paste
Choose CSS value, CSS property, or Tailwind format, then click Copy. The value is ready to paste straight into your stylesheet or component.
Parameter reference
Box shadow parameter guide
| Parameter | Range | Default | Notes |
|---|---|---|---|
| Offset X | −100 to 100 px | 0 | Horizontal shadow position; negative values move the shadow left. |
| Offset Y | −100 to 100 px | 4 px | Vertical shadow position; positive values move the shadow down. |
| Blur radius | 0 to 200 px | 10 px | Higher values produce softer, more spread-out shadows. 0 gives a sharp edge. |
| Spread radius | −100 to 100 px | 0 | Positive values enlarge the shadow; negative values shrink it. |
| Color | Any RGBA | rgba(0,0,0,0.25) | Use semi-transparent black for natural shadows on any background. |
| Inset | On / Off | Off | Places the shadow inside the element, useful for pressed states or inner glows. |
Tips
Shadow design tips
-
Layer light and dark shadows for realism
Real-world shadows have soft ambient and sharper contact components. Try a large, low-opacity blur layer combined with a small, slightly higher-opacity layer near the element.
-
Keep opacity low for subtle elevation
For cards and buttons that sit a few pixels above the page, shadows in the rgba(0,0,0,0.04–0.12) range look natural on both light and dark backgrounds.
-
Use inset shadows for pressed states
An inset shadow with a small blur and negative spread creates a convincing pressed effect for interactive elements like buttons and toggles.
-
Test on different backgrounds
Use the preview background toggle to check your shadow on light, dark, and custom-coloured backgrounds before committing to the final values.