CSS Box Shadow Generator

Layer multiple shadows, fine-tune blur and spread, and create modern, smooth UI effects.

Shadow Layers

Preview
Preview
CSS Code


                            
                            
                        

Standard box-shadow property supported by all modern browsers

How CSS Box Shadow Works

The CSS box-shadow property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A standard box-shadow consists of the following parameters:

Design Styles & Use Cases

1. Hover Effects

By increasing the Y-offset and Blur radius, you simulate an object being "lifted" up, commonly used for button or card hover states.

2. Neumorphism

Combines a light shadow and a dark shadow (one top-left, one bottom-right) to create a soft extruded plastic look.

3. Soft Shadows

Uses multiple layeres of low-opacity shadows to create extremely smooth, natural depth often found in modern styles like Stripe or Apple design.

4. Inner Glow

Uses the inset keyword. Great for input focus states or pressed button effects.

FAQ

How to create "natural" smooth shadows?
Natural shadows are usually made of multiple layers. Add 2-3 layers of shadows, each with increasing blur and decreasing opacity, to simulate real light decay.
Does Box Shadow affect performance?
Large shadows or high blur radii can be expensive to render, especially on mobile. If scrolling feels laggy, reduce the number of layers or blur radius.
What is Inset shadow used for?
Inset renders the shadow inside the element. It's often used for form inputs (adding depth), pressed button states, or picture frame effects.
Why do my shadows look "dirty"?
Using pure black (#000000) with low opacity can look dirty. Try using a very dark blue or purple as the shadow color for a richer, more natural look.
Can Spread radius be negative?
Yes. A negative spread shrinks the shadow. Combined with a large blur, it can create a unique "floating" effect where the shadow looks detached from the edges.
What color formats are supported?
All CSS color formats including Hex, RGB, RGBA, HSL, HSLA. For shadows, RGBA or HSLA are most common to control transparency.
Does Box Shadow take up layout space?
No. Box shadows are painted outside the border edge and do not affect the document flow (layout) or increase the element's size.
Browser compatibility?
Modern browsers (Chrome, Firefox, Safari, Edge) fully support box-shadow. Prefixes are generally no longer needed.

More Free Tools