CSS Shadow Designer
Visually design CSS box-shadow with multiple layers, inset shadows, and live preview
Drag the sliders for offset, blur, spread, and color — the preview updates instantly so you can dial in the exact box-shadow you need without reloading anything. Stack up to five layers, toggle inset on any of them, then copy the final CSS in one click.
And everything runs in your browser. Nothing gets uploaded.
How It Works
Each slider maps directly to a box-shadow property value. Move the horizontal offset slider and the preview element shifts its shadow left or right in real time. The tool concatenates your layers into a single box-shadow declaration with comma-separated values. Hit the copy button and it is ready for your stylesheet — no manual formatting required.
Examples
Subtle Card Elevation
The shadow most dashboards and SaaS apps use on their cards. Barely visible, but it separates the card from the background.
X: 0px Y: 2px
Blur: 8px Spread: 0px
Color: rgba(0,0,0,0.08)
box-shadow: 0px 2px 8px 0px rgba(0,0,0,0.08);
Multi-Layer Depth Effect
Two shadow layers stacked — a tight dark one for sharpness and a wider soft one for ambient depth. Material Design uses this pattern heavily.
Layer 1: 0px 1px 3px rgba(0,0,0,0.12)
Layer 2: 0px 4px 16px rgba(0,0,0,0.06)
box-shadow:
0px 1px 3px rgba(0,0,0,0.12),
0px 4px 16px rgba(0,0,0,0.06);
Inset Input Field Groove
That pressed-in look for text inputs and text areas. Gives a tactile, almost physical feel to form elements. Quick to set up — just check the inset box.
X: 0px Y: 2px
Blur: 4px Spread: 0px
Color: rgba(0,0,0,0.15)
Inset: checked
box-shadow: inset 0px 2px 4px 0px rgba(0,0,0,0.15);
Who Uses This
Prototyping card shadows and button hover states without writing CSS from scratch each time.
Getting the exact shadow values to hand off in design specs instead of eyeballing it in Figma.
Learning how each box-shadow parameter actually changes the visual output — way faster than reading docs.
Quickly generating production-ready shadow code for client landing pages and portfolios.
Common Mistakes
Shadows with rgba(0,0,0,0.5) or darker look harsh and unnatural. Drop the opacity to 0.06–0.15 range, or pick a dark shade of your background color instead of pure black. Much more realistic.
Zero blur creates a hard, flat outline — not a shadow. That is almost never what you want for elevation effects. Bump blur to at least 4px for a natural look. Even 2px makes a difference.
A shadow that looks perfect on white can vanish entirely on a dark theme. Always toggle your site's dark mode and check. You may need a second shadow rule with lighter color values for dark backgrounds.
Technical Details
- Processing: 100% client-side — nothing uploaded
- Browser Support: Chrome, Firefox, Safari, Edge (all modern versions)
- Shadow Layers: Unlimited — stack as many as you need
- Output Format: Standard CSS box-shadow with optional -webkit prefix
Frequently Asked Questions
What is the CSS box-shadow syntax?
The full syntax is: box-shadow: [inset] offset-x offset-y blur-radius spread-radius color. Only offset-x and offset-y are required — everything else defaults to 0 or black. You can comma-separate multiple shadows on one property for layered effects.
How many box-shadow layers can I add?
There's no hard limit in the CSS spec. Browsers handle dozens without any performance issues. In practice, two or three layers give you realistic depth. Going beyond five rarely adds visible improvement and just makes the code harder to maintain.
What is the difference between blur and spread in box-shadow?
Blur controls how soft the shadow edge is — higher values make it fuzzier. Spread makes the shadow bigger or smaller than the element itself. Positive spread expands it, negative spread shrinks it. They do completely different things even though they sound similar.
Does box-shadow affect page layout?
No. Shadows are purely visual and don't take up space in the document flow. They won't push other elements around or change your layout. That said, a large shadow can overflow its container visually, so you may need overflow:visible on the parent or some extra padding.
Is box-shadow bad for performance?
For static elements, barely noticeable. The cost shows up when you animate box-shadow — the browser has to repaint every frame. If you need animated shadows, consider animating opacity on a pseudo-element with a fixed shadow instead. That's much cheaper on the GPU.