// ShadowGen.
Free CSS Design Tool

Design Flawless CSS Shadows In Real Time

The most intuitive CSS box-shadow generator on the web. Stack multiple layers, fine-tune blurs and spreads, test on dark/light surfaces, and export clean CSS, Tailwind classes, and CSS variables.

Multi-Layer
Up to 8 Stacks
Tailwind Ready
Arbitrary Class Output
100% Client-Side
Zero Server Tracking
Instant Copy
CSS, SCSS & Vars
Interactive Studio

Visual Box Shadow Studio

Adjust sliders, toggle layers, inspect the real-time canvas, and copy production-ready code.

⚡ Quick Presets

Click any preset to load instantly
Shadow Layers2 / 8
Layer 1
Layer 2

🎛️ Layer Properties

Horizontal Offset (X)0px
Vertical Offset (Y)14px
Blur Radius30px
Spread Radius-6px
Opacity40%

🎨 Preview Environment

Border Radius18px
Shape:

👁️ Live Interactive Preview

Real-time render
Card Preview
2 Active Layer(s)
📋 Generated CSS Code
CSS Declaration
box-shadow: 0px 14px 30px -6px rgba(0, 0, 0, 0.4), 0px 4px 12px -2px rgba(108, 99, 255, 0.2);
Tailwind Arbitrary Class
shadow-[0px_14px_30px_-6px_rgba(0,_0,_0,_0.4),_0px_4px_12px_-2px_rgba(108,_99,_255,_0.2)]
CSS Custom Property (Variable)
--box-shadow: 0px 14px 30px -6px rgba(0, 0, 0, 0.4), 0px 4px 12px -2px rgba(108, 99, 255, 0.2);
Vendor Prefixes (-webkit- / -moz-)
-webkit-box-shadow: 0px 14px 30px -6px rgba(0, 0, 0, 0.4), 0px 4px 12px -2px rgba(108, 99, 255, 0.2);
-moz-box-shadow: 0px 14px 30px -6px rgba(0, 0, 0, 0.4), 0px 4px 12px -2px rgba(108, 99, 255, 0.2);
box-shadow: 0px 14px 30px -6px rgba(0, 0, 0, 0.4), 0px 4px 12px -2px rgba(108, 99, 255, 0.2);
Developer Handbook

Mastering the CSS box-shadow Syntax

Everything you need to know about crafting realistic, high-performance web shadows.

The Complete CSS Syntax Anatomy

box-shadow: [inset] <offset-x> <offset-y> <blur-radius> <spread-radius> <color>;
offset-x & offset-y:

Positions the shadow horizontally and vertically relative to the element. Positive X moves right; positive Y moves down.

blur-radius:

Controls the Gaussian blur width. Cannot be negative. 0 creates a solid silhouette shadow.

spread-radius:

Expands or contracts the shadow boundary before blur occurs. Negative values reduce shadow size for ambient diffusion.

inset keyword:

Reverses the rendering direction, drawing the shadow inside the container. Great for countersunk buttons and wells.

Why Single-Layer Shadows Look Fake

In real-world physics, shadows are not uniform blurs. They consist of an umbra (the dark core right where the object touches the ground) and a penumbra (the soft, dissipating outer fade created by ambient light).

By stacking multiple layers — e.g. a small tight layer (0 2px 4px rgba(0,0,0,0.1)) plus a large spread layer (0 12px 24px rgba(0,0,0,0.08)) — your UI gains authentic, tangible tactile depth without looking muddy.

Got Questions?

Frequently Asked Questions

Clear answers to the most common questions about CSS box shadows.

What is CSS box-shadow and how does it work?

The CSS box-shadow property attaches one or more drop shadows to an element's frame. It is described by X and Y offsets relative to the element, blur and spread radii, and color. By combining multiple comma-separated shadow layers, developers can achieve photorealistic depth, ambient lighting, and glowing effects.

What is the difference between blur-radius and spread-radius?

Blur-radius controls how soft or blurry the edge of the shadow appears (the higher the number, the larger and lighter the blur; 0 yields a razor-sharp edge). Spread-radius expands or contracts the physical footprint of the shadow before blur is applied (positive values make the shadow larger than the element, while negative values shrink it).

How do multi-layered shadows create realistic depth?

In the real world, light from multiple ambient sources bounces around objects, creating a combination of a tight, dark contact shadow directly underneath and a soft, diffuse ambient shadow that spreads outward. In CSS, using 2 to 4 comma-separated box-shadow layers replicates this natural light decay and looks far superior to a single heavy shadow.

What does the inset keyword do?

When you include the inset keyword, the shadow turns inward and is drawn inside the element's border box rather than outside. This creates a recessed, sunken, or carved appearance, commonly used for pressed button states, input fields, and neumorphic designs.

How do I use these generated box shadows in Tailwind CSS?

Tailwind CSS v3+ supports arbitrary values using square brackets. ShadowGen automatically formats the shadow with underscores replacing spaces (e.g. shadow-[0px_10px_25px_-5px_rgba(0,0,0,0.3)]). Simply copy the Tailwind snippet and add it directly to your JSX class list.

Does box-shadow affect web page performance?

Large blur and spread values on elements that frequently animate or scroll can cause repaint overhead because shadows are rendered on the CPU. For buttery 60fps animations, prefer animating opacity or transform instead of animating the box-shadow property directly, or apply will-change: transform / filter.

What is Neumorphism and how is it created with box-shadow?

Neumorphism (Soft UI) creates elements that appear extruded from the background. It is made by matching the box's background color exactly to the canvas and casting two opposing shadows: a bright highlight shadow in the top-left (e.g. -10px -10px white) and a dark depth shadow in the bottom-right (e.g. 10px 10px dark).

Is my design or code saved or transmitted to a server?

No. ShadowGen runs 100% on the client side in your web browser. None of your shadow parameters, colors, or code snippets are sent to any remote server. It is completely private and lightning-fast.

What is the browser support for CSS box-shadow?

CSS box-shadow has been a W3C standard for over a decade and is supported in 100% of modern web browsers including Chrome, Edge, Safari, Firefox, Opera, and all mobile browsers. Vendor prefixes (-webkit-) are no longer strictly needed for modern browsers, but ShadowGen includes them for legacy compatibility.

Can I define box shadows as CSS custom properties (variables)?

Yes. In fact, defining shadows as CSS variables (e.g., --card-shadow: 0 10px 25px rgba(0,0,0,0.2);) in your :root or component styles allows you to maintain consistent design tokens across light and dark themes effortlessly.