Copied!
✨

CSS Box Shadow Generator

Layered shadows, inset, neon glow and glassmorphism. Drag the sliders, copy the CSS.

SETTINGS & PARAMETERS

RetroBox Live CSS Preview
Generated CSS Code
box-shadow: 8px 8px 0px rgba(0, 0, 0, 1);

How box-shadow actually works

Every CSS shadow is the same six-part declaration. Once you can read it, you no longer need a generator to guess — you use one to iterate faster.

box-shadow: inset offset-x offset-y blur spread color;
offset-x / offset-y
Where the shadow sits relative to the box. Positive Y pushes it down, which is what a light source above produces — the direction the eye reads as natural.
blur
How soft the edge is. At 0 you get a hard-edged duplicate of the box, which is the whole basis of the neo-brutalist look.
spread
Grows or shrinks the shadow before it is blurred. Negative spread is the trick behind a tight shadow that hugs the element instead of leaking out from under it.
inset
Draws the shadow inside the box instead of outside. This is how you make a field look pressed in rather than raised.

Why one shadow always looks cheap

A single large blur is the giveaway of a design that has not been looked at twice. Real objects do not cast one shadow — there is a tight, dark contact shadow where the object meets the surface, and a wide, faint one from ambient light.

Stack them with commas. The first shadow in the list paints on top:

box-shadow:
  0 1px 2px rgba(0,0,0,0.07),
  0 4px 8px rgba(0,0,0,0.06),
  0 12px 24px rgba(0,0,0,0.05);

Each layer roughly doubles the previous blur while the opacity drops. That ratio is the whole recipe, and it is why a stack of three weak shadows reads as more expensive than one strong one.

Neon glow

A glow is a shadow with no offset and a bright colour. Set both offsets to 0 so the light radiates evenly, then layer a tight one under a wide one:

box-shadow:
  0 0 5px #0ff,
  0 0 20px rgba(0,255,255,0.6);

Glassmorphism

The frosted-panel effect is not a shadow at all — the shadow is only the finishing touch. Three properties do the work: a semi-transparent background, a blur applied to whatever is behind the element, and a pale one-pixel border catching the light along the top edge.

background: rgba(255,255,255,0.15);
-webkit-backdrop-filter: blur(12px);
backdrop-filter: blur(12px);
border: 1px solid rgba(255,255,255,0.25);
box-shadow: 0 8px 32px rgba(0,0,0,0.18);

Two things catch people out. The -webkit- prefix is still required for Safari. And the effect is invisible over a flat background — it needs something with contrast behind it, a photograph or a gradient, or you have simply built a grey box.

FAQ

How do I add multiple shadows to one element?

Separate them with commas in a single box-shadow declaration. The first in the list is painted on top of the others. A second box-shadow property does not add a shadow — it replaces the first one entirely.

What is the difference between blur and spread?

Spread resizes the shadow before it is blurred; blur softens its edge. A negative spread with a large blur gives a soft halo that stays tucked under the element instead of spilling past it.

Why is my inset shadow invisible?

An inset shadow is drawn inside the padding box and is hidden by an opaque background on a child element. It also has nothing to show on an element with no height, which is the usual cause on an empty div.

Does box-shadow hurt performance?

A static shadow costs nothing worth measuring. Animating one does: each frame is a fresh paint. Animate the opacity of a pseudo-element carrying the shadow, which the compositor can handle without repainting.

Why doesn't my shadow follow my icon's shape?

Because box-shadow always traces the rectangular box, transparency included. For an SVG or a cut-out PNG, use filter: drop-shadow(), which follows the alpha channel.

📖 GUIDE 100% PRIVATE & LOCAL

How to Design Smooth CSS Box Shadows & Layered Shadows

Box shadows are crucial for establishing visual hierarchy, elevation, and tactile feel in modern web interfaces. RetroBox Box Shadow Generator helps you build multi-layered CSS `box-shadow` styles, inset shadows, neon glows, and subtle neomorphic depth.

⚡ STEP-BY-STEP INSTRUCTIONS:

1

Adjust Horizontal (X) and Vertical (Y) offsets to position the shadow light source.

2

Tune Blur Radius to soften the shadow edge and Spread Radius to control shadow size.

3

Select shadow color and adjust opacity for natural, soft ambient occlusion.

4

Copy the resulting `box-shadow` CSS property directly into your CSS or Tailwind stylesheet.

❓ FREQUENTLY ASKED QUESTIONS (FAQ):

Q: How do layered box shadows improve UI design?

Layering multiple soft shadows with low opacity creates realistic, multi-dimensional elevation compared to a single harsh black shadow.

Q: Can I generate inset box shadows for input fields?

Yes, toggle the 'Inset' option to render inner shadows ideal for form inputs, pressed buttons, and recessed containers.

★ POPULAR TOOLS: {} JSON Formatter 📋 Paste to PNG 🌈 CSS Gradients 🔲 Box Shadows 🔑 JWT Debugger ⏰ Cron Builder
YOUR AD HERE

Want to promote your app, SaaS, dev tool, or business to thousands of engineers? Affordable dedicated spots available.

GET THIS SPOT ($) →