Box Shadow
Generator
Design perfect CSS box shadows with live preview. Adjust offset, blur, spread and color — stack multiple layers for depth.
① Adjust X, Y, blur, spread ② Layer up to 3 shadows ③ Copy the CSS
box-shadow: 5px 10px 20px 0px rgba(0, 0, 0, 0.25);X and Y offsets control the shadow direction. Positive X pushes right, negative left. Positive Y pushes down, negative up.
Blur radius softens the shadow edges (0 = sharp). Spread expands or contracts the shadow beyond the element bounds.
Inset shadows appear inside the element, creating a pressed or recessed effect instead of an outer drop shadow.
CSS box-shadow — how it works and when to use it
The CSS box-shadow property adds shadow effects around an element's frame. It accepts horizontal offset (X), vertical offset (Y), blur radius, spread radius and color. Use rgba() with partial opacity (typically 0.1–0.25) for soft, realistic shadows. The inset keyword places the shadow inside the element, creating pressed button effects and depth in form fields. Stack multiple shadows with comma-separated values to achieve Material Design elevation levels or neumorphism effects. box-shadow does not affect layout and is GPU-composited for smooth animations — unlike filter: drop-shadow(), which follows the element's alpha shape and is better suited for transparent PNGs and SVGs.