Home Developer Tools Box Shadow Generator
Dev

Box Shadow Generator

Design CSS box shadows visually. Control offset, blur, spread and colour — add multiple layers and copy the CSS instantly.

⚡ Live preview 📋 Copy CSS in one click 🚫 No login required ✅ Free forever

📖How to Use the Box Shadow Generator

  1. 1
    Configure your shadow

    Set horizontal and vertical offset, blur radius, spread radius and shadow colour. Toggle inset on or off.

  2. 2
    Add multiple layers

    Click Add Layer to stack multiple box shadows on the same element — each layer is independently configurable.

  3. 3
    Copy the CSS

    Click Copy CSS to copy the complete box-shadow property with all layers.

CSS Tools in This Suite

ToolBest For
Bootstrap GridResponsive layouts
Border RadiusRounded corners
Box ShadowDepth & elevation
CSS VariablesDesign tokens
Flexbox1D layouts
Media QueryResponsive CSS

Frequently Asked Questions

What is CSS box-shadow?

box-shadow adds one or more shadow effects around an element's frame. Each shadow is defined by X offset, Y offset, blur radius, spread radius and colour. Multiple shadows can be layered with commas.

What does the inset keyword do?

Adding inset makes the shadow appear inside the element rather than outside it. Inset shadows create the appearance of pressed or recessed UI elements like sunken buttons or input fields.

What is the difference between blur and spread radius?

Blur radius controls how soft and diffused the shadow edges are — a value of 0 gives a sharp shadow. Spread radius expands or contracts the shadow in all directions before blur is applied.

Can I add multiple box shadows to one element?

Yes. Separate multiple box-shadow values with commas. The first shadow in the list is rendered on top. This lets you create layered, multi-coloured or multi-directional shadow effects.

How do I make a realistic drop shadow with box-shadow?

Use a small positive Y offset (e.g. 4px), a moderate blur (e.g. 12px), zero spread and a semi-transparent black colour like rgba(0,0,0,0.15). This mimics natural light falling from above.

How do I create a glowing effect with box-shadow?

Use 0 for both X and Y offset, a large blur radius and 0 for spread. Set the colour to a vivid, fully opaque or semi-transparent hue. For example: box-shadow: 0 0 20px rgba(10,106,255,0.6).

Does box-shadow affect layout or take up space?

No. Like outline, box-shadow does not affect the document flow or the element's box model dimensions. It does not push other elements away.

Can I animate box-shadow with CSS transitions?

Yes. box-shadow is animatable. Use transition: box-shadow 0.3s ease to smoothly transition between shadow states on hover, focus or any state change.

What is the performance impact of box-shadow?

box-shadow triggers paint operations during animation, which can affect performance on older devices. For smooth animations, prefer filter: drop-shadow() or transform-based alternatives where performance is critical.

How is box-shadow different from filter: drop-shadow()?

box-shadow applies to the element's box (its rectangular border-box). filter: drop-shadow() applies to the alpha shape of the element — useful for non-rectangular elements like PNGs with transparency.