What Does the Box Shadow Generator Do?
This generator builds CSS box-shadow effects visually. Drag five sliders — horizontal offset, vertical offset, blur radius, spread and opacity — pick the shadow and box colors, optionally flip to an inset (inner) shadow, and watch the preview update live. The exact CSS appears below, ready to copy, with the color expressed as an rgba() value so the opacity you chose travels with it.
How to Design a Shadow
- Adjust the offset sliders — positive Y pushes the shadow down, mimicking overhead light.
- Add blur for softness and spread to grow or shrink the shadow.
- Lower the opacity — realistic shadows are subtle (10–30%).
- Copy the one-line CSS and paste it onto your element.
Shadow Recipes That Work
- Subtle card —
0 1px 3px rgba(0,0,0,.12): barely-there elevation for list items and inputs. - Floating card —
0 10px 30px rgba(0,0,0,.15): the modern "lifted" look for modals and popovers. - Pressed button — inset with small offsets: makes an element look pushed into the page.
- Glow — zero offsets, generous blur, a colored shadow: focus rings and neon effects.
- Layered realism — combine two shadows (comma-separated): one tight and dark, one large and faint — how design systems like Material create depth.
Shadows communicate hierarchy: the bigger and softer the shadow, the "closer" the element feels. Keep direction consistent across a page — one light source, usually from above.