CSS Box Shadow Generator
Design a box-shadow with sliders and live preview.
box-shadow: 0px 8px 24px -4px rgba(0, 0, 0, 0.35);How to use
- 1 Drag the offset X and Y sliders to position the shadow.
- 2 Adjust blur and spread to soften or grow it.
- 3 Set the shadow colour, including any rgba transparency.
- 4 Toggle inset if you want an inner shadow, then copy the CSS.
About CSS Box Shadow Generator
The CSS Box Shadow Generator lets you design a drop shadow by feel rather than by trial and error in the dev tools.
Drag sliders for the horizontal and vertical offset, the blur radius and the spread, set the shadow colour, and flip the inset toggle to draw the shadow inside the element instead of outside it.
A live preview updates as you move each control, and the exact box-shadow declaration is shown ready to copy.
Shadows are deceptively fiddly: a few pixels of blur or a slightly too-dark colour is the difference between a shadow that looks crisp and one that looks muddy.
Seeing the result immediately, next to the generated value, makes it easy to dial in a soft elevation, a hard offset border or a subtle inset press effect.
The blur is never allowed to go negative, which is an easy mistake to make by hand, and the offsets and spread accept negative values where CSS does.
This is handy for cards, buttons, modals, focus rings and any component that needs to lift off the page.
Reach for it when you want a shadow that matches a design spec, or when you just want to experiment until something looks right.
The generator is pure client-side code: nothing you build is uploaded, and the copy button drops the value straight into your stylesheet.
FAQ
What does inset do?
Inset draws the shadow inside the element’s border, creating a pressed-in or inner-glow effect rather than a drop shadow underneath it.
Can I use rgba colours for soft shadows?
Yes. Type any valid CSS colour, including rgba() or hsla() with transparency, which is the usual way to make a shadow look soft and natural.