Box Shadow Generator
Generate CSS box shadows
Shadow 1
Horizontal4px
Vertical4px
Blur16px
Spread0px
Color
CSS Output
box-shadow: 4px 4px 16px 0px #00000033;
About This Tool
Horizontal β positive moves shadow right, negative moves left. Vertical β positive moves shadow down, negative up. Blur β larger values create softer, more diffuse shadows. Spread β positive expands the shadow, negative shrinks it.
Enable inset to create inner shadows. Add multiple shadows by clicking "+ Add Shadow" β they are comma-separated in the CSS output, layered from front to back.
How to Use
- Adjust the Horizontal and Vertical sliders to set the shadow offset.
- Increase Blur for a soft, diffuse shadow or set it to 0 for a hard shadow.
- Use Spread to expand or shrink the shadow size beyond the element.
- Click "+ Add Shadow" to layer multiple shadows for richer effects.
Use Cases
Designers use box-shadow for depth and elevation in card UI components. Inset shadows create pressed or debossed button effects. Multiple layered shadows produce realistic lighting with ambient and key lights. Spread-only shadows (zero blur) act as solid outlines without affecting layout.
FAQ
- What is the inset option? β Inset shadows appear inside the element border instead of outside. They are useful for creating pressed-in effects on inputs and buttons.
- Can I add multiple shadows? β Yes. Click "+ Add Shadow" to add another shadow layer. All shadows are combined into one box-shadow declaration, comma-separated.
- What does a negative spread value do? β A negative spread shrinks the shadow smaller than the element. Combined with offset and blur, this creates a subtle shadow that peeks out from only one side.