Agenvix Enterprise Suite
CSS Effects Studio

CSS Box Shadow Generator with Layers

Design single or multi-layer box shadows visually: offsets, blur, spread, colour, opacity and inset per layer, Material elevation and smooth layered presets, a live preview on any background, and copy-ready CSS or Tailwind.

How It Works
Unlimited Layers
Live Preview
Tailwind Output
Zero Server Logs
Agenvix Studio v2.0
CSS Generated2 layers
Layer 1:
0 4px 6px -1px rgba(15, 23, 42, 0.1)
Layer 2:
0 2px 4px -2px rgba(15, 23, 42, 0.1)
Tailwind:
shadow-[0_4px_6px_-1px_rgba(15,23,42,0.1),…]
● Inset supportedCopy as CSS / Tailwind
Quick Test Presets:Click to load
Inset supported
100% Free

Box Shadow Workspace

Adjust each layer with the sliders. The preview and the CSS update instantly; add layers for realistic depth.

Layer 1
0px
4px
6px
-1px
10%
Layer 2
0px
2px
4px
-2px
10%
Preview
CSS
box-shadow: 0px 4px 6px -1px rgba(15, 23, 42, 0.1),
              0px 2px 4px -2px rgba(15, 23, 42, 0.1);
Layers
2
Inset
0
Max blur
6px
Valid box-shadow. Paste the declaration into any selector; layers are painted top to bottom in the order shown.

Why Front-End Developers Use the Agenvix Box Shadow Generator

Realistic shadows come from layers, and layers are tedious to write by hand.

Multi-Layer by Default

Stack as many shadows as you need, reorder them, toggle inset per layer and see the combined result immediately.

Production Presets

Start from Material elevation, soft card, smooth layered, neumorphic, hard offset and glow presets, then tweak.

CSS and Tailwind

Copy a standard box-shadow declaration or a Tailwind arbitrary value class, with colours written as rgba for alpha.

Preview in Context

Change the preview background, box colour and corner radius to match your actual component before you copy.

Simple as 1-2-3

How the Box Shadow Generator Works

Three steps to a polished shadow.

01

Pick a Starting Point

Choose a preset or begin with the default two-layer card shadow.

02

Shape Each Layer

Drag the X, Y, blur, spread and opacity sliders, choose a colour and toggle inset. Add or remove layers as needed.

03

Copy the Code

Copy the CSS declaration or the Tailwind class and paste it into your stylesheet or component.

Property Reference

box-shadow Parameters

What each value controls and sensible ranges.

Feature / SpecificationBest Use CaseEngine / Output StandardPrivacy & SecurityPerformance RatingAction
Offset X / YLight directionpx, negative allowed-50 to 50 pxCore
Blur radiusSoftness of the edge0 = hard edge0 to 100 pxCore
Spread radiusGrow or shrink the shadowNegative tightens-50 to 50 pxOptional
Colour + opacityTinted, realistic shadowsrgba() output0 to 100%Core
insetPressed states, inner glowsShadow inside the boxPer layerOptional
Multiple layersNatural depthComma-separated, first on topUnlimitedRecommended
Comprehensive CSS Guide

Designing Shadows That Look Real

1. Anatomy of box-shadow

The syntax is box-shadow: [inset] x y blur spread color. X and Y move the shadow, blur softens its edge, spread grows it in every direction, and the colour almost always needs alpha so underlying content shows through. Multiple shadows are separated by commas and painted in order, with the first one on top.

2. Why layered shadows look better

Real shadows have a tight dark core and a wide faint penumbra. One blur cannot do both, so designers stack several layers with increasing offset and blur at low opacity.

  • Keep each layer between 5 and 15 percent opacity; the layers add up.
  • Double offset and blur on each successive layer for a smooth falloff.
  • Keep Y larger than X so the light appears to come from above.

3. Tinted shadows and dark mode

Pure black shadows look muddy on coloured backgrounds. Tint the shadow with a darker version of the background hue, or with the brand colour for glow effects. In dark mode shadows are barely visible against dark surfaces, so designers raise the surface colour slightly instead and use shadows mainly for overlays and menus.

4. Performance considerations

Large blur radii on many elements cost paint time, especially when animated. Animate opacity or transform instead of the shadow itself, for example by cross-fading a pseudo-element that carries the hover shadow. Prefer filter: drop-shadow() only when you need the shadow to follow a non-rectangular shape such as a PNG or SVG.

Frequently Asked Questions

Everything you need to know about CSS box shadows

Syntax, layering, Tailwind and performance.

What is the difference between blur and spread?

Blur softens the shadow edge without changing its size much; spread enlarges (positive) or shrinks (negative) the shadow before blurring. Negative spread with moderate blur is the classic trick for shadows that do not leak out of the sides.

How do I make a shadow appear only on one side?

Use a Y offset with a negative spread roughly equal to the blur, for example 0 8px 8px -8px. The negative spread pulls the shadow in so only the offset side shows.

Can I use the output in Tailwind CSS?

Yes. The Tailwind tab outputs an arbitrary value class such as shadow-[0_4px_6px_-1px_rgba(15,23,42,0.1)] with spaces replaced by underscores, which Tailwind v3 and v4 accept directly.

Does box-shadow affect layout?

No. Shadows are painted outside the box model and do not change element size or trigger reflow, but they do add to paint cost.

Why does my inset shadow not show?

Inset shadows are drawn inside the padding box and are hidden by an opaque child that fills the element. Add padding or reduce the child size, and remember a background image on the same element paints below the inset shadow.

How many layers should I use?

Two or three layers cover most UI needs. Five-layer smooth shadows look excellent on large cards and modals but are overkill for buttons.

Is box-shadow supported everywhere?

Yes. Unprefixed box-shadow has worked in every browser since 2012, including inset and multiple layers.

Is my design stored anywhere?

No. The generator runs in your browser; nothing is sent to Agenvix.