CSS Box Shadow Generator – Visual Shadow Builder
box-shadow: 0px 4px 24px 0px rgba(0, 0, 0, 0.15);
Design CSS box shadows visually. Use sliders to control horizontal and vertical offset, blur radius, spread, color, and opacity. Add up to 5 layered shadows and see the result on a live preview box. Copy the complete CSS rule with one click.
Box Shadow Parameters
| Parameter | Range | Effect |
|---|---|---|
| Horizontal Offset | −50 to 50px | Positive = right, Negative = left |
| Vertical Offset | −50 to 50px | Positive = down, Negative = up |
| Blur Radius | 0 to 100px | Higher = softer edges |
| Spread Radius | −50 to 50px | Positive = larger, Negative = smaller |
| Inset | On / Off | Inner shadow (pressed effect) |
Frequently Asked Questions
What is CSS box-shadow?
The CSS box-shadow property adds one or more shadow effects to an element. Each shadow is defined by horizontal offset, vertical offset, blur radius, spread radius, color, and an optional inset keyword. Multiple shadows are separated by commas.
What does the blur radius do?
The blur radius controls how soft the shadow edges are. A value of 0 creates a hard-edged shadow with no blur. Higher values make the shadow larger and more diffuse. The blur radius cannot be negative.
What is the spread radius?
The spread radius expands or contracts the shadow. A positive value makes the shadow larger in all directions. A negative value shrinks it. A spread of 0 means the shadow is the same size as the element.
What is an inset shadow?
An inset shadow appears inside the element's border, creating a pressed-in or embossed effect. Without inset, the shadow appears outside the element (a drop shadow). Both can be combined in the same element.
Can I have multiple box shadows?
Yes. CSS box-shadow accepts multiple comma-separated shadows. This tool lets you add up to 5 shadows simultaneously. Stacking shadows is used for layered effects like Material Design's elevation system.
What is the difference between box-shadow and drop-shadow filter?
box-shadow is a CSS property that applies to the rectangular bounding box of an element. filter: drop-shadow() follows the actual shape of the element, including transparent areas. Use drop-shadow for PNG images with transparent backgrounds.
Does box-shadow affect layout?
No. box-shadow does not affect the document flow or the element's size. Adjacent elements are unaware of the shadow. If you need shadows to take up space, use outline or padding instead.
How do I create a Material Design elevation shadow?
Material Design uses multiple layered shadows with different opacities and blur values to simulate elevation. For example, elevation 4 uses: box-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 4px 8px rgba(0,0,0,0.1). Use the "Add shadow" button to layer them.
Related Developer Tools
Base64 Encoder / Decoder
Encode and decode Base64 instantly.
Border Radius Generator
Generate CSS border-radius visually with live preview.
Color Palette Generator
Create harmonious color palettes from any color.
Color Picker
Pick colors and get HEX, RGB, HSL, CMYK instantly.
CSS Formatter / Beautifier
Format and beautify CSS code instantly.
CSS Gradient Generator
Generate linear, radial, and conic CSS gradients visually.
CSS Minifier
Minify CSS code instantly in browser.
HEX to RGBA Converter
Convert HEX colors to RGB/RGBA instantly.
HTML Minifier
Minify HTML to reduce page size instantly.
HTML Table Generator
Create HTML tables in seconds.
