Box Shadow CSS Generator
Generate CSS box-shadow properties with a live preview. Adjust offset, blur, spread, color, and inset settings.
About Box Shadow CSS Generator
Our free Box Shadow CSS Generator lets you visually design CSS box-shadow effects with real-time preview. Adjust the horizontal and vertical offsets, blur radius, spread radius, color, opacity, and inset toggle, then copy the generated CSS code directly into your project.
The CSS box-shadow property adds shadow effects around an element's frame. You can set multiple shadows separated by commas. A box-shadow is described by X and Y offsets relative to the element, blur and spread radii, and color. The inset keyword changes the shadow to one inside the frame.
Box shadows are one of the most commonly used CSS effects for creating depth and visual hierarchy in modern web design. They're used for cards, buttons, modals, dropdowns, and virtually any element that needs to appear elevated or separated from the background.
Frequently Asked Questions
Q What is the difference between blur and spread?
Blur radius determines how fuzzy the shadow edges are — higher values create softer, more diffused shadows. Spread radius expands or contracts the shadow in all directions — positive values make the shadow larger than the element, negative values make it smaller. Both are measured in pixels.
Q What does inset do?
The inset keyword changes the shadow from an outer shadow to an inner shadow. Instead of appearing outside the element, the shadow appears inside the element's border. This creates a "pressed in" or "concave" effect that's commonly used for input fields and inset buttons.
Q Can I use multiple shadows?
Yes! CSS supports multiple box shadows separated by commas. For example: box-shadow: 0 2px 4px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1); creates a layered shadow effect. This generator creates a single shadow, but you can manually combine multiple shadows in your CSS.
