How to use it
- Set the horizontal and vertical offset. Positive values move the shadow right and down.
- Adjust blur, spread, color and opacity.
- Tick Inset for an inner shadow, or press Add layer to stack another one.
- Press Copy and paste the rule into your stylesheet.
What the output means
box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.25); reads: no horizontal offset, 4px down, 12px of blur, no spread, black at 25 percent opacity. With several layers the values are separated by commas. Zero values are written without units.
Example
A card with a close shadow and a wide soft one: 0 1px 2px 0 rgba(0, 0, 0, 0.2), 0 8px 24px 0 rgba(0, 0, 0, 0.15).
Tips
- Keep opacity low, usually 10 to 30 percent, for a natural look.
- A shadow does not change the element’s layout, but it can be cut off by a parent with
overflow: hidden. - Use a negative spread with a larger blur for a shadow that appears only on one side.