Controls
Shadows
Preview
Presets
Generated CSS
box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.1);Overview
Generate box shadows for depth and elevation effects. Layer multiple shadows, control offset, blur, spread, and color. Toggle between outer shadows for elevation or inset shadows for depth. Essential for modern card designs and Material Design interfaces.
Understanding Box Shadow for Depth and Elevation
Box shadow adds shadow effects around an element's frame. You can set multiple effects separated by commas, creating realistic depth and elevation in your designs. Shadows are a key component of Material Design and modern UI patterns.
Creating Realistic Shadows
Realistic shadows typically have a slight vertical offset, moderate blur, and use semi-transparent black. The spread value can make shadows appear larger or smaller than the element itself.
Multiple Shadows for Layered Effects
Stacking multiple shadows creates depth and dimension. Use a combination of small, sharp shadows for proximity and larger, softer shadows for elevation. This technique is used extensively in card designs and floating UI elements.
Performance Tips
- Box shadows are GPU-accelerated in modern browsers
- Large blur radii can impact performance on complex pages
- Consider using box-shadow instead of drop-shadow filter for better performance
- Limit the number of shadows on elements that animate frequently
Browser Support
Box shadow is fully supported in all modern browsers without vendor prefixes.
