CSS Box Shadow Generator

Drag the sliders to shape a shadow, stack multiple layers for real depth and glows, toggle inset, and copy the exact box-shadow CSS — with a live preview the whole time.

Live preview Multi-layer shadows 100% client-side · free · no signup

Shadow controls

0px
10px
25px
-5px
#1F3A5F
22%

Preview

Box Stage

Generated CSS


      

Shipping UI, docs and design tokens all day?

QADIR OS agents generate, refactor and theme the CSS behind your product — components, tokens and shadows — automatically, on your own machine.

Join Early Access

Design box-shadows visually, then copy the CSS

The CSS box-shadow property is deceptively deep: five values per shadow, an optional inset keyword, and a comma-separated list so you can stack as many shadows as you like. Guessing those numbers by hand and reloading the page is slow. This generator gives you a slider for every value and a live preview that updates as you drag, then hands you the exact box-shadow declaration to paste into your stylesheet.

The anatomy of a box-shadow

A single shadow reads offset-x offset-y blur spread color, optionally prefixed with inset. Here is what each value controls:

ValueWhat it doesTip
offset-xMoves the shadow left (negative) or right (positive)Keep small for a natural look
offset-yMoves the shadow up (negative) or down (positive)A little positive Y reads as "lit from above"
blurSoftens the edge; 0 is hard, high is diffuseMore blur = the object feels higher up
spreadGrows (+) or shrinks (−) the shadow before blurA small negative spread tucks the shadow in
colorAny CSS colour — usually a translucent rgba()Tint toward the background, avoid pure black
insetDraws the shadow inside the boxThe key to recessed / pressed looks

Why layer multiple shadows

Real objects do not cast a single flat shadow, and neither should your UI. Stacking a couple of shadows — a tight, darker one close to the element plus a wider, softer one further out — produces the natural depth you see in polished design systems. The browser paints the list back-to-front, so the first shadow in your CSS sits on top. Use the layer chips above to add, select, and remove layers; the tool assembles the full comma-separated value for you.

Neumorphism in two layers

The soft-UI "neumorphism" look is just two shadows in opposite directions: a dark one down-and-right and a light one up-and-left, both against a background of the same colour as the element. Pick the Neumorphism preset to see the pattern, then nudge the offsets and opacity to taste. Switch both layers to inset for the pressed-in variant.

Performance note

Very large blur values on many elements can cost paint performance, especially while animating. If you animate a shadow, prefer transitioning box-shadow between two pre-defined states over recomputing huge blurs every frame, and test on a mid-range device. For a purely decorative glow that never changes, a big blur on a handful of elements is fine.

Privacy

Everything here runs in your browser as plain JavaScript. Nothing you configure is uploaded, logged or stored — refresh and it resets. It is free with no signup, so it is safe for client work and internal projects.

More front-end tools