CSS Box Shadow Generator
Create perfect CSS box shadows with a visual editor. Adjust offset, blur, spread, color, and opacity with live preview. Stack multiple shadow layers.
codeGENERATED CSS
box-shadow: 4px 4px 12px 0px rgba(0, 0, 0, 0.25);
How It Works
Adjust offset, blur, spread, and color
Add multiple shadow layers
See changes in real-time preview
Copy the generated CSS code
Understanding CSS Box Shadows
Box Shadow Syntax
The box-shadow property takes values for x-offset, y-offset, blur-radius, spread-radius, and color. You can stack multiple shadows separated by commas for complex effects.
Multiple Shadows
Layering multiple shadows creates realistic depth effects. A common technique uses a sharp close shadow for definition and a soft distant shadow for ambient occlusion, mimicking real-world lighting.
Neumorphism
Neumorphism uses two box shadows - one light and one dark - on a matching background to create soft, extruded UI elements. It produces a modern, tactile look that simulates physical depth.
Shadow Design Tips
For natural-looking shadows, use rgba() with low opacity (0.1 to 0.3) rather than solid grey colors. Match your shadow direction to a consistent light source across the UI. Larger blur values create softer, more ambient shadows, while smaller blurs produce sharper, closer shadows. Use negative spread to make shadows smaller than the element, creating a floating effect. For elevated cards, combine a large soft shadow with a small sharp shadow. The inset keyword creates inner shadows, useful for pressed buttons and input fields.