Box Shadow Generator - Visual CSS & Tailwind Builder

Visually design beautiful layered CSS box shadows in real-time. Stack shadows, toggle insets, customize RGBA colors, and copy clean CSS or Tailwind classes.

Shadow preview
Live card shadow

Shadow Layers

Stack multiple shadows to create realistic depth and soft elevation.

Position & Softness
Horizontal offset (X)0px
Vertical offset (Y)24px
Blur radius48px
Spread-12px
Color & Opacity
Color
Opacity18%
rgba(0, 0, 0, 0.18)
CSS
.card {
  box-shadow: 0px 24px 48px -12px rgba(0, 0, 0, 0.18), inset 0px 16px 36px -10px rgba(0, 0, 0, 0.1);
}
Tailwind utility
shadow-[0px_24px_48px_-12px_rgba(0,_0,_0,_0.18),_inset_0px_16px_36px_-10px_rgba(0,_0,_0,_0.1)]
Paste the CSS into your stylesheet, or drop the Tailwind class on any component to reuse this shadow across your design system.
✠- Live Preview

See shadows render in real-time

✠- Multi-Layer

Stack up to 3 shadows for depth

✠- Inset Support

Toggle between drop and inset shadows

✠- CSS & Tailwind

Copy for any framework instantly

Box Shadow Generator: Master CSS Box Shadows & UI Elevations

Modern visual interface design relies heavily on depth cues to convey visual hierarchy and interactivity. By simulating real-world physical lighting, designers can indicate which elements are clickable cards, floating modals, or sunken forms.

Creating high-fidelity shadows in raw CSS code is historically difficult. It requires tweaking multiple offsets, blur spreads, and opacity calculations. Our **Box Shadow Generator** provides an intuitive visual playground where you can stack multiple shadows, toggle insets, and instantly export production-ready CSS rules or Tailwind classes.

Formula
box-shadow: [inset] <X-Offset> <Y-Offset> <Blur-Radius> <Spread-Radius> <Color>

CSS shadows conform to a precise multi-variable syntax standard:

The Art of Multi-Layer Stacking

In standard web design, a single box shadow often looks artificial. Real-world shadows are composed of multiple layers of light dispersion:

• **The Key Shadow (Sharp):** A close, darker shadow that mimics direct light blocking and grounds the element on the page.
• **The Ambient Shadow (Soft):** A wide, highly blurred shadow with low opacity representing indirect bounced room light.

Stacking these two elements using our multi-layer builder results in professional elevation styles reminiscent of high-end design systems like Tailwind UI, Material Design, and Stripe.

Practical Examples

Ultra-Soft Modern Card Elevation

  • 1.Layers: 2 Layers stacked
  • 2.Ambient Layer: 0px 24px 48px -12px rgba(0,0,0,0.18)
  • 3.Inset Layer: inset 0px 16px 36px -10px rgba(0,0,0,0.10)
  • 4.Use Case: Perfect for landing page cards and feature lists.

Recessed Inner Slate Panel

  • 1.Layers: 1 Inset Layer
  • 2.Parameters: inset 0px 4px 6px 0px rgba(0,0,0,0.12)
  • 3.Use Case: Ideal for visual input fields and toggle buttons.

Frequently Asked Questions

What is the difference between an drop shadow and an inset shadow?

A standard drop shadow appears outside the boundaries of the element, making it look elevated above the page canvas. An inset shadow appears inside the element, making it look recessed or sunken (like an input field or a pressed button).

Why should I use layered box shadows?

Single shadows can look harsh, synthetic, and flat. Layering multiple shadows (usually one broad soft shadow and one sharp close shadow) simulates how real physical light scatters, creating organic, smooth, and modern UI elevations.

Does this tool support hex opacity values?

Yes. The tool dynamically parses Hex values (e.g. #000000) and mixes them with the opacity slider to output standard CSS rgba() notation which is compatible with all modern browsers.

How does the spread parameter work?

The spread radius increases or decreases the size of the shadow source shape before applying blur. A negative spread is excellent for creating clean 'floating' card shadows because it makes the shadow smaller than the host card.

Are the Tailwind CSS classes compatible with Tailwind v3 and v4?

Yes. We generate arbitrary value Tailwind classes (e.g. shadow-[0px_10px_15px_-3px_rgba(0,0,0,0.1)]) which compile seamlessly in all active Tailwind builds.

Is my shadow code private and secure?

Absolutely. No data is sent to a server. The entire box shadow builder runs inside your local web browser sandbox, ensuring zero-latency offline security.