CSS TOOLS · BFOTKIT

CSS Box Shadow Generator | BFOTKit

Compose one or two layered box shadows with full control over offsets, blur, spread, color, and inset, and copy the exact CSS.

Preview

Layering a soft ambient shadow with a tight contact shadow is the standard recipe for realistic elevation.

CSS

Everything is computed and rendered locally in this browser tab. Nothing is sent to a server.

GUIDE

How to design realistic shadows

Understand the four numbers

Offset X and Y move the shadow; blur softens its edge; spread grows or shrinks it before blur. A shadow at 0 0 with blur and no spread is a glow around all sides.

Layer two shadows for depth

Real objects cast a soft ambient shadow and a tight contact shadow where they touch the surface. Enable the second shadow with a small Y offset and low blur to ground the element, and keep the first one soft and diffuse.

Shadows carry color, not just black

Neutral gray-black shadows look flat on colored backgrounds. Try a very dark version of the page background hue at low opacity for shadows that feel natural.

HELP / FAQ

Box shadow questions

What does inset do?

The inset keyword draws the shadow inside the element, which reads as a pressed state, an input well, or a subtle inner highlight. It stacks with normal shadows in one property.

Why is my shadow invisible?

Usually the offsets and blur are zero, the spread is negative enough to shrink it to nothing, or the color matches the background. The live preview reflects exactly what the browser will draw.

Do shadows affect layout?

No. Box shadows are painted without influencing layout, so they can overflow containers. If they get clipped, check for overflow: hidden on an ancestor.

How many shadows can I use?

The property accepts a comma-separated list of any length, but each one costs paint time. Two or three well-chosen layers are usually indistinguishable from five.

EXPLORE BY CATEGORY · BFOTKIT

More tools like this

Pick a category to see every tool in it — then open one and discover related tools.

Browse all tools