CSS Box Shadow Generator With Live Preview

Design a CSS box shadow with sliders, stack several shadows, try presets and copy the code.

box-shadow: 0px 10px 30px 0px rgba(0, 0, 0, 0.12);
border-radius: 12px;
12px
Shadow 1
0px
10px
30px
0px
12%

Design a CSS box shadow with sliders and see it on a live preview box. Set how far the shadow sits across and down, the blur, the spread, its shade and opacity, and tick Inset to put it inside the box. Stack up to six shadows for softer, more realistic depth, and start from presets: Soft, Subtle, Layered, Floating, Hard, Glow, Inner and Soft UI, the raised look also called neumorphism. Change the box and background shades and the corner radius to match your design. The CSS updates as you go, with each shadow on its own line, and copies with one click. Your settings are saved in this browser. For backgrounds, try the CSS Gradient Generator; for the frosted glass look, the Glassmorphism Generator.

Common use cases

  • Cards, buttons and pop-ups that need depth
  • Matching a shadow from a design mock-up
  • Trying layered and inner shadows quickly
  • Learning what each box-shadow value does

How to use

  1. Pick a preset or adjust the first shadow.
  2. Add more shadows to layer them.
  3. Set the box, background and corner radius.
  4. Copy the CSS.

FAQ

What do the box-shadow values mean?

In order: how far across (x) and down (y) the shadow sits, the blur radius, the spread (which grows or shrinks it), and the shade. Add inset at the start to draw it inside the box.

How do I make a shadow look natural?

Use a low opacity, a larger blur and a downward offset, or stack two or three shadows of increasing size. Pure black at full strength rarely looks right.

Can I have more than one shadow?

Yes. CSS accepts a list of shadows separated by commas, drawn with the first one on top. This tool stacks up to six.

Does box-shadow slow a page down?

A few shadows don't. Very large blurs on many elements, or shadows that animate, can make scrolling less smooth on slow phones.