How to Use CSS Box Shadow Generator
- Adjust the sliders for the current shadow layer.
- Add more layers or pick a preset.
- Copy the CSS or Tailwind class.
CSS Box Shadow Generator Features
- Multiple layers: stack shadows like real light.
- Inset shadows: for pressed and inner effects.
- Live preview: custom background, box color and border radius.
- CSS and Tailwind: copy either format.
- 8 presets: soft, subtle card, floating, brutalist, glow, inner, neumorphism, Material.
- Free and unlimited: use it as often as you like without registering.
- Private: runs in your browser — your data is not uploaded to our servers.
- Any device: desktop or mobile, in Chrome, Safari, Edge or Firefox.
How box-shadow Works
The syntax is box-shadow: x y blur spread color. Positive x moves the shadow right, positive y moves it down, blur softens the edge and spread grows or shrinks it. A negative spread with a large blur keeps the shadow under the element, which looks more natural. Separate several shadows with commas – the first one is drawn on top.
Design Tips
- Use low opacity (8–20%) and dark blue-gray instead of pure black for a modern look.
- Combine a small, sharp shadow with a large, soft one for depth.
- Keep the light source consistent – all shadows should fall the same way.
- Shadows don’t affect layout, so they never shift content.
Who Uses the CSS Box Shadow Generator?
- Web designers and front-end developers
- Building cards, buttons and modals
- Learning CSS shadow syntax
Frequently Asked Questions
How do I make a soft shadow?
Use a large blur (20–40px), a small vertical offset, a slightly negative spread and low opacity – the “Soft” preset is a good start.
How do I create neumorphism?
Use the same color for the background and the element, then add a darker shadow to the bottom-right and a white shadow to the top-left. The Neumorphism preset sets this up.
Does box-shadow slow down my site?
Static shadows are cheap. Animating large blurred shadows can be expensive – animate opacity of a pseudo-element instead.
What is the difference between box-shadow and drop-shadow?
box-shadow follows the element’s rectangular box (and border radius). The CSS filter drop-shadow() follows the actual visible shape, so it works better for transparent PNG icons and irregular shapes.
How do I add a shadow only on one side?
Use an offset in one direction with a negative spread equal to the blur, for example 0 8px 6px -6px for a shadow only at the bottom.
Can I animate a box shadow on hover?
Yes – add a transition such as transition: box-shadow .2s and a stronger shadow on :hover. For many cards on one page, animating the opacity of a pseudo-element with the shadow is smoother.