Skip to content

Generate CSS box shadows

Design layered CSS box shadows visually with offset, blur, spread, inset and opacity per layer, then copy the CSS or a Tailwind class, all in your browser.

Corner radius24px
Box size180px
CSS
box-shadow: 0 10px 30px -5px rgb(15 23 42 / 0.18);
Tailwind class
shadow-[0_10px_30px_-5px_rgb(15_23_42/0.18)]
Layers
X offset0px
Y offset10px
Blur30px
Spread-5px
Opacity18%
Presets
Runs in your browser · no uploadHow it works

How to use Box shadow generator

  1. 1

    Choose a starting shadow

    Click a preset such as Soft, Layered or Elevation 2, or adjust the default layer.

  2. 2

    Shape each layer

    Select a layer and set its X and Y offset, blur, spread, colour, opacity and inset.

  3. 3

    Check it on your surface

    Change the box size, corner radius and colours to match the element you are styling.

  4. 4

    Copy the CSS

    Copy the box-shadow declaration or the Tailwind class into your code.

Limits and Pro

Free with no sign-up: unlimited layers, offsets from −100 to 100 px, blur up to 200 px and 12 shadow presets.

Pro removes the ads; the shadow editor is complete on every plan. See Pro

About Box shadow generator

The CSS box-shadow property takes a list of layers, each with a horizontal and vertical offset, a blur radius, a spread distance, a colour and an optional inset keyword. Getting depth that looks natural means balancing all of those across two or more layers, which is hard to do by editing numbers in a stylesheet. This editor shows the result on a live preview box while you drag sliders, and writes the declaration and a Tailwind shadow-[…] class for you.

Add as many layers as you like, hide one temporarily to compare, move it up or down — the first layer in the list is drawn on top — or switch it to inset for pressed buttons and input fields. Offsets range from −100 to 100 pixels, blur up to 200 pixels and spread from −100 to 100, and every colour has its own opacity. Negative spread is the trick behind modern soft shadows: it pulls the shadow in under the element so only a gentle glow shows below it.

The preview box can be resized and given any corner radius, box colour and background colour, so you can judge the shadow on the actual surface of your design, including dark themes where shadows need more opacity or a coloured glow.

Twelve starting points are included: four Material Design elevation levels, a soft single layer, a five-layer smooth shadow, a hard neubrutalist offset, neumorphism, an inner shadow, a coloured glow, a focus-style outline ring and a floating card. Gradients are in the other tab; text shadows and the drop-shadow() filter aren't covered.

Privacy

The shadow is built and previewed entirely in this page, and your layers are saved only in this browser's local storage so they survive a reload. No settings or designs are sent to a server.

Box shadow generator: frequently asked questions

What is the difference between blur and spread?
Blur softens the shadow's edge: 0 gives a crisp copy of the box, larger values fade it out over that many pixels. Spread grows or shrinks the shadow before blurring, so a positive spread makes it larger than the box and a negative one tucks it underneath. Combining a large blur with a negative spread gives the subtle, lifted look common in current interfaces.
In which order are multiple shadows drawn?
The first shadow in the list is painted on top and the last at the bottom, all of them beneath the element itself. Order matters when layers overlap with different colours, for example a coloured glow over a dark base. Use the arrow buttons to move a layer up; the generated CSS always lists layers in the order shown.
How do I make a shadow look good in dark mode?
Black shadows almost vanish on dark backgrounds, so designers either raise the opacity, lighten the surface of the elevated element instead, or use a soft glow in a brand colour. Set the preview background to your dark surface colour and try the Glow preset, then tune its colour and spread.
Can box-shadow follow the shape of a transparent PNG?
No. box-shadow always follows the element's box and its border-radius, not the visible pixels of an image or icon inside it. For irregular shapes use the CSS filter drop-shadow(), which follows transparency but accepts only one shadow without spread. This generator produces box-shadow values only.
Does a heavy box-shadow slow down my page?
Static shadows are cheap for modern browsers. Large blur radii on many elements, or animating box-shadow on hover, can cost repaints on low-end phones. For hover effects, animate the opacity of a pseudo-element that carries the shadow, or animate transform, which the browser can composite without repainting the shadow each frame.

Other tasks with this tool

All developer tools