Design box shadows visually with live preview. Add multiple layers, choose presets, and copy production-ready CSS.
This tool lets you create CSS box-shadow declarations visually without writing code by hand. Here is how to get started:
The box-shadow CSS property adds one or more shadow effects around an element's frame. The full syntax is:
box-shadow: [inset] <offset-x> <offset-y> <blur-radius> <spread-radius> <color>;
| Value | Description | Default |
|---|---|---|
inset | Optional. Changes the shadow from outer to inner (inside the element). | outer |
offset-x | Horizontal offset. Positive values move the shadow right, negative values move it left. | 0 |
offset-y | Vertical offset. Positive values move the shadow down, negative values move it up. | 0 |
blur-radius | How blurry the shadow is. Higher values produce a more diffused shadow. Cannot be negative. | 0 |
spread-radius | How much the shadow expands or contracts. Positive values grow the shadow; negative values shrink it. | 0 |
color | The color of the shadow. Use rgba() for transparency. | currentColor |
You can apply multiple shadows to a single element by separating each shadow declaration with a comma. The first shadow listed is rendered on top.
These are popular box-shadow patterns used in modern web design. Click any preset above to load them into the generator, or copy the CSS below.
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.06);
A lightweight shadow for cards and containers. Mimics Material Design's lowest elevation level.
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
A balanced shadow that works for hover states and modals. Gives a clear sense of depth without being heavy.
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
A big, soft shadow for hero sections and floating panels. Creates strong visual hierarchy.
box-shadow: 5px 5px 0px 0px #1a1a2e;
A hard-edge shadow with zero blur for a bold, retro or brutalist design aesthetic.
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04),
0 8px 16px rgba(0, 0, 0, 0.08),
0 24px 48px rgba(0, 0, 0, 0.08);
Multiple layers at increasing distances create the most natural-looking shadow, similar to real-world light behavior.
Box shadows are a powerful design tool, but they do have performance implications. Keep these tips in mind:
box-shadow directly. Each frame triggers a repaint. Instead, animate opacity on a pseudo-element with the shadow, or use transform: scale() for hover effects.will-change: transform sparingly. It promotes an element to its own compositor layer, which can help with animations but increases memory usage.filter: drop-shadow() for non-rectangular shapes. Unlike box-shadow, drop-shadow follows the element's alpha channel, making it ideal for images with transparency or clipped shapes.inset keyword changes the shadow from an outer shadow (default) to an inner shadow. An inset shadow appears inside the element's border, creating a pressed-in or recessed visual effect. This is commonly used for input fields and buttons.box-shadow property is supported in all modern browsers including Chrome, Firefox, Safari, Edge, and Opera. It has been supported since IE9. No vendor prefixes are needed for current browser versions.