Box Shadow Generator
Create CSS box shadows with a visual editor, multiple layers, and live preview.
Embed this toolPresets
Live Preview
Shadow Layers
Generated CSS
.element {
box-shadow: 0px 4px 6px 0px rgba(0, 0, 0, 0.1);
}Advertisement
Understanding CSS Box Shadows
The box-shadow property is one of the most versatile tools in a web developer\'s arsenal. It allows you to add depth, hierarchy, and visual interest to flat designs. A well-crafted shadow can make a button feel pressable, a card feel elevated, or a modal feel layered above the page.
A single shadow is defined by four length values and a color: horizontal offset, vertical offset, blur radius, and spread radius. The offset values determine the direction of the light source. Negative horizontal offset casts the shadow to the left; negative vertical offset casts it upward.
Modern UI design often uses multiple layered shadows to create more natural, realistic depth. For example, a floating card might combine a tight, dark shadow close to the element with a softer, larger shadow further away. This mimics how real objects cast multiple overlapping shadows under ambient lighting.