</>

WebDevTools

Box Shadow Generator

Generate CSS shadows visually

Create CSS shadows with visual controls. Adjust offset, blur, spread, color and opacity. Use inset for inner shadows. Real-time preview and copy-ready code.

px
px
px
px
0.10

Preview

Preview

CSS Code

box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.1);

Guide: compose CSS box-shadow with layers and preview

Realistic shadows stack multiple layers — offset, blur, spread, and alpha color. Hand-writing `box-shadow` for card elevation is hard to reuse across a design system.

Each layer is editable with instant in-browser preview; styles never leave your machine. See how blur and spread interact before pasting into component CSS.

Use for elevation tokens (`shadow-sm`, `shadow-lg`), accessible focus rings, and UI mockups. Pair with border-radius to ensure clipped corners look right.

Step by step

  1. Add the first layerSet offset X/Y, blur, spread, and RGBA color. `inset` shadows model pressed inputs.
  2. Stack more layersDuplicate for soft halo + crisp drop shadow — common in Material-like UIs.
  3. Tune against the previewCheck contrast on light and dark backgrounds; heavy shadows break dark mode.
  4. Export the declarationCopy `box-shadow: …` into CSS modules, `--shadow-*` variables, or design system docs.

Frequently asked questions