Box Shadow Generator

Design CSS box shadows visually with layers and presets, then copy the CSS or Tailwind class.

Layer 1
box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.18);
border-radius: 16px;

This box shadow generator lets you design CSS shadows visually - from a barely-there card edge to soft layered depth, glows, neumorphism and inner shadows - and copy the code. Stack several layers, tune each one with sliders, and see the result live on your own colors. It runs entirely in your browser.

How box-shadow works

Each shadow is written as offset-x offset-y blur spread color, for example 0 8px 24px -4px rgba(0, 0, 0, 0.18):

  • Offsets move the shadow right/down (negative values go left/up), as if a light shone from the opposite side.
  • Blur softens the edge - 0 gives a hard, cut-out shadow.
  • Spread grows or shrinks the shadow before blurring. A negative spread with a larger blur gives the soft, lifted look used by most modern card designs.
  • inset draws the shadow inside the element, which makes it look pressed in.

Why layer shadows?

Real shadows are sharp and dark close to an object and soft and faint further away. A single CSS shadow can only be one of those, so designers stack several - each with double the offset and blur of the one before. The Layered smooth preset shows the technique. Layers are separated by commas, and the first one is drawn on top.

Neumorphism and glows

Neumorphism pairs a dark shadow on one side with a light one on the other, on a box the same color as the page, so the shape seems to rise out of the surface. A glow is simply a colored shadow with no offset and a large blur, and looks best on dark backgrounds. Keep accessibility in mind: neumorphic buttons often have too little contrast to be seen clearly.

Frequently asked questions

Can I use the result with Tailwind CSS?

Yes - Copy Tailwind class gives an arbitrary-value class such as shadow-[0_8px_24px_-4px_rgba(15,23,42,0.18)] that works in Tailwind 3 and 4 without any configuration.

Do shadows slow a page down?

Static shadows are cheap. Animating a large, blurry box-shadow can be costly, so for hover effects animate the opacity of a pseudo-element that carries the shadow, or animate transform instead.

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

box-shadow follows the element's box and border radius. The filter: drop-shadow() function follows the actual visible shape, including transparent PNG and SVG outlines, but does not support spread or inset.

Related tools

Build backgrounds with the CSS Gradient Generator, check text readability with the Color Contrast Checker, or browse all Developer tools.

Runs entirely in your browser - nothing you enter or upload is sent to a server.