Design CSS shadows visually
Shadows give interfaces depth: they lift cards off the page, show which button is pressed and separate a dialog from the content behind it. The CSS box-shadow property is powerful but its five numbers are hard to tweak blind. This generator gives you sliders and a live preview, lets you stack several shadows for a natural look, and outputs clean CSS you can paste straight into your project.
Features
- Offset, blur, spread, color and opacity controls with instant preview.
- Up to five layers combined into one
box-shadowdeclaration. - Inset shadows for pressed and recessed effects.
- Corner radius and preview colors to match your design.
- Presets for soft, medium, hard, layered, inset and glow shadows.
- Copy-ready CSS with colors in
rgba()format.
Example
A layered shadow that looks natural on light backgrounds:
.card {
box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.07),
0px 4px 8px 0px rgba(0, 0, 0, 0.07),
0px 16px 32px 0px rgba(0, 0, 0, 0.07);
border-radius: 16px;
}
Shadow design tips
| Goal | Suggested settings |
|---|---|
| Subtle card on white | y 4, blur 12, opacity 8% |
| Floating dropdown or dialog | 2–3 layers, y up to 24, blur up to 48, opacity 7–12% each |
| Retro "flat" look | x 6, y 6, blur 0, opacity 100% |
| Focus or glow effect | x 0, y 0, blur 16–24, spread 2–4, brand color |
| Pressed input field | inset, y 2, blur 6, opacity 25–30% |
Keep the light source consistent: if shadows fall downward on one component, they should fall downward everywhere.
Related tools
Create the background behind your cards with the CSS Gradient Generator, convert colors between HEX, RGB and HSL with the Color Converter, or pick colors from a screenshot with the Image Color Picker.