CSS Box Shadow Generator

Build multi-layer shadows visually. Adjust sliders, pick colours, apply presets — copy the CSS in one click.

Presets

Layers

0px 4px 12px 0px

Active Layer

0px
4px
12px
0px
20%

Preview

CSS Output

box-shadow: 0px 4px 12px 0px #00000033;

Full rule:

.element {
  box-shadow: 0px 4px 12px 0px #00000033;
}

About the CSS Box Shadow Generator

The CSS Box Shadow Generator lets you build multi-layer box-shadow rules visually with a live preview — no manual CSS editing required. Adjust horizontal and vertical offset, blur radius, spread radius, colour, and opacity for each shadow layer, then copy the ready-to-use CSS with one click.

Layering multiple shadows on a single element is one of the most powerful techniques in modern CSS UI design. This tool supports up to five simultaneous shadow layers, with per-layer visibility toggling so you can isolate and fine-tune each one independently. Six built-in presets — Subtle, Soft, Raised, Hard, Neon, and Inset — give you a solid starting point for any design style.

How to Generate a CSS Box Shadow

  1. Click a Preset to load a pre-built shadow style, or start from the default single-layer shadow.
  2. Click Add in the Layers panel to stack up to five shadow layers for complex depth effects.
  3. Select any layer in the list to make it the active layer and edit its properties below.
  4. Drag the Horizontal and Vertical Offset sliders to position the shadow relative to the element.
  5. Increase Blur Radius for soft, diffuse shadows or set it to 0 for a hard-edged shadow.
  6. Use Spread Radius to grow (positive) or shrink (negative) the shadow beyond the element's bounds.
  7. Pick a Colour and adjust Opacity — coloured shadows are great for neon and glow effects.
  8. Toggle Inset to flip the shadow inside the element, creating pressed or embossed effects.
  9. Use the eye icon to hide individual layers without deleting them.
  10. Click Copy to grab the finished box-shadow CSS rule.

Common Use Cases for CSS Box Shadows

  • Card elevation — Add a subtle drop shadow to cards and panels to lift them off the page background and create visual hierarchy.
  • Button depth — Use a small offset shadow to give buttons a raised, pressable appearance; remove it on :active to simulate a click.
  • Focus rings — Replace the browser's default focus outline with a custom box-shadow ring for accessible, styled keyboard focus indicators.
  • Neon and glow effects — Layer two or more coloured shadows at zero offset with increasing blur to produce a soft neon glow on dark backgrounds.
  • Inset shadows for inputs — Apply an inset shadow to text inputs and textareas to create a recessed, sunken look.
  • Modal and dropdown overlays — Use a large, low-opacity drop shadow on modal dialogs and popovers to separate them from the page content.
  • Neumorphism and soft UI — Combine a light shadow on one side and a dark shadow on the opposite side to achieve the popular neumorphic design style.

Frequently Asked Questions

What do the box-shadow parameters mean?

The box-shadow property takes: horizontal offset (positive = right), vertical offset (positive = down), blur radius (how soft the edge is), spread radius (how much the shadow expands), and colour. Prepend inset to flip it inside the element.

What is an inset box shadow?

An inset shadow is drawn inside the element's border instead of outside it. It is commonly used to create recessed inputs, pressed button states, or inner glow effects.

Can I stack multiple box shadows on one element?

Yes. CSS allows any number of comma-separated shadow layers on a single element. The first value in the list renders on top. This tool lets you add and manage up to five layers with independent controls for each.

What is the difference between blur radius and spread radius?

Blur radius controls how blurry (soft) the shadow edge is — a value of 0 gives a sharp, hard edge. Spread radius grows or shrinks the shadow's base size before blurring: positive values make it larger than the element, negative values make it smaller.

How do I create a coloured or neon shadow?

Select a non-black colour using the colour picker and set zero horizontal and vertical offsets. Increase the blur radius to spread the glow. Add a second layer with the same colour but a larger blur and lower opacity for a more natural neon falloff.

Does box-shadow affect page layout?

No. Unlike outline or border, box-shadow does not take up space in the document flow. Adding or removing a shadow will never cause elements to shift or the layout to reflow.

Is box-shadow supported in all browsers?

box-shadow has full support across all modern browsers including Chrome, Firefox, Safari, and Edge. No vendor prefixes are required for current browser targets.