DexTools

CSS Box Shadow Generator

Tune a CSS box shadow with live sliders for offset, blur, spread and colour, then copy the rule.

Nothing leaves your browser Dex Media & Design

Preview

Shadow

Options

box-shadow: 0px 10px 24px -4px #1d4ed880;
Save to DriveInsert into Office

Saving needs a Dex account. The tool never does.

How it works

  • Drag the offset, blur and spread sliders and the preview card updates immediately. The CSS rule underneath always matches what you see.
  • Negative spread shrinks the shadow, which is how a tight shadow is made under a rounded card. Negative offsets move it up and left.
  • The inset switch moves the shadow inside the element, which is the usual way to show a pressed or sunken state.
  • The four values are exactly the CSS order: horizontal, vertical, blur, spread. Nothing is normalised behind your back.

Examples

A card that lifts off the page

0 10px 24px -4px with a translucent dark colour reads as a soft lift. Large blur with negative spread keeps it from looking like a smear.

A pressed button

Switch to inset and use a small offset with a dark translucent colour. The shadow now reads as depth inside the control.

Frequently asked questions

Why does my shadow look muddy?

Usually a saturated colour at full opacity. Real shadows are dark and translucent: try a black or deep blue with alpha around 30 percent.

What does spread do?

It grows or shrinks the shadow before blurring. Negative spread is what keeps a shadow tight under an element instead of spilling out.

Can I have more than one shadow?

CSS supports a comma-separated list and so does the underlying function here, but the interface exposes one layer. Paste the rule and duplicate it by hand for layered shadows.

Is this uploaded?

No. The preview and the rule are produced in the page.