Box Shadow Generator

Create custom CSS box shadows with a visual editor.

css
box shadow
design
visual
generator

Shadow Settings

5px
5px
10px
0px
25px

Preview

box-shadow: 5px 5px 10px 0px rgba(0, 0, 0, 0.25);

About this tool

Design beautiful CSS box shadows with an intuitive visual editor. Adjust horizontal and vertical offset, blur, spread, color, and opacity. Copy the generated CSS code instantly.

Features

  • Visual editor for CSS box shadow properties
  • Adjust offset, blur, spread, color, and opacity
  • Support for multiple shadows and inset shadows
  • Copy generated CSS code instantly

How to Use

  1. Use the sliders to adjust shadow properties
  2. Set horizontal and vertical offset, blur, and spread
  3. Choose shadow color and opacity
  4. Copy the CSS code and paste it into your stylesheet

Frequently Asked Questions

What's the difference between box-shadow and filter drop-shadow?

box-shadow tints a rectangle around the element's border box, ignoring transparent pixels inside. filter: drop-shadow casts a shadow of the actual painted shape — useful for PNGs, SVGs, and rounded clip-paths where you want the shadow to hug the content, not the bounding box.

How do I make the shadow look more natural?

Use larger blur than offset, and a translucent shadow colour (rgba(0,0,0,0.1) instead of solid black). Real shadows are soft and faint; designers new to CSS tend to use 5 5 0 0 black, which looks like clip-art. Two stacked shadows — one tight, one diffuse — also mimic real light.

Can I stack multiple shadows?

Yes — comma-separate them in the box-shadow value. The first shadow renders on top. Stacks of 3–5 shadows with increasing blur and decreasing opacity produce realistic elevation (the "Material Design" look is essentially this).

Does box-shadow trigger repaints on scroll?

Only the first paint is expensive. After layout, the shadow is rasterised and reused. Animating the shadow directly (e.g., on hover) is the costly case — prefer animating a secondary element or using opacity on a pre-rendered pseudo-element.

Is inset different from outer shadow?

Yes — inset shadows render inside the border, like the element is pressed in. Use them for focus rings on tactile-looking buttons, sunken panels, or highlighting scrollable overflow. They stack with outer shadows in the same box-shadow value.