BOX SHADOW
GENERATOR
Build layered CSS box shadows visually. Stack multiple shadows, tweak every parameter, preview live, and copy production-ready CSS in one click.
Box Shadow Syntax
box-shadow: offset-x offset-y blur spread color. Offset-x/y move the shadow, blur softens edges, spread expands/contracts the shadow. Inset makes it an inner shadow. Multiple shadows are comma-separated.
Layering Shadows
CSS supports multiple comma-separated shadow layers. First shadow in the list renders on top. Combining a hard shadow (low blur) with a soft shadow (high blur) creates realistic depth. This is how design systems like Tailwind build their shadow scales.
Inset Shadows
Adding the inset keyword moves the shadow inside the element, creating a pressed/embossed effect. Useful for inputs, toggle switches, and cards that should appear recessed rather than raised.
Performance Note
Box shadows trigger paint but not layout. They are GPU-accelerated in modern browsers. For animation, prefer filter: drop-shadow() on elements with transparent backgrounds, or animate opacity on a pseudo-element shadow.
box-shadow: 0 0 20px 5px rgba(0,0,0,0.3) creates an even glow effect around all sides. Useful for focus rings and glowing UI elements.box-shadow: 5px 5px 10px #b8bcca, -5px -5px 10px #ffffff.Build CSS box shadows visually with live preview — no maths required.