About Box Shadow Generator
Build CSS box-shadows visually. Drag offset, blur, and spread sliders; pick a color (with alpha); toggle inset; stack multiple shadows for layered depth. Live preview on a sample card. Copy as CSS or as a Tailwind utility class.
What good shadows look like
Bad shadows are loud — box-shadow: 0 0 50px black over everything. Good shadows are quiet — they suggest depth without becoming a feature.
The technique pros use:
- Offset down by Y, not X — light comes from above
- Soft blur —
blur≈ 3-4×Y-offsetfor natural look - Spread carefully — usually 0 or slightly negative
- Layer two — a tight close shadow + a soft wide shadow
- Color with alpha —
rgba(0,0,0,0.1)not solid black
Layered shadow recipe
box-shadow:
0 1px 3px rgba(0, 0, 0, 0.05),
0 4px 16px rgba(0, 0, 0, 0.08);
Two layers. Reads as elevated. Subtle. Used by every modern design system.
Common workflows
Card elevation. Generate a 4dp / 8dp / 16dp / 24dp ladder; map to your design tokens.
Pressed-button state. Inset shadow on :active. Subtle but felt.
Floating action button. Larger spread, tighter blur. Reads as suspended.
Modal scrim. Wide shadow with high alpha. Sets the modal apart from the page.
Why visual matters
Shadows tune by feel. Numbers in CSS don’t communicate the visual outcome. Sliding the offset bar gives the same answer faster than typing values and reloading.
Frequently asked questions
What does each parameter do?
When do I stack shadows?
What is inset?
Performance considerations?
How does this differ from drop-shadow?
box-shadow is rectangular, follows the element's box. filter: drop-shadow() follows the element's visible shape (handles transparent PNGs, irregular SVGs). Different tools, different jobs.Tailwind support?
shadow-[...] arbitrary value, or pick a preset that maps to shadow-md, shadow-lg, etc.Related tools
Last updated: 2025-01-15