Create CSS box shadows with sliders, layers and presets, see them live and copy the code. Free and private.
Start from a preset
CSS code
box-shadow: 0px 10px 25px 0px rgba(10, 43, 39, 0.2);
Paste the code into the style of any element. Nothing is sent to a server.
NinjaFunction's CSS Box Shadow Generator lets you design a shadow by moving sliders for offset, blur, spread and opacity, and see the result on a live preview box. Add up to five layers, switch to an inset shadow, start from ready presets such as Soft, Layered or Glow, change the box and page colours, and copy the finished CSS in one click. It runs in your browser, so nothing is sent to a server.
| Setting | What it changes |
|---|---|
| Horizontal offset | Moves the shadow left (negative) or right (positive) |
| Vertical offset | Moves the shadow up (negative) or down (positive) |
| Blur | Makes the edge soft. 0 gives a hard edge |
| Spread | Makes the shadow bigger or smaller before it is blurred |
| Colour and opacity | The shade of the shadow and how see-through it is |
| Inset | Draws the shadow inside the box |
Use the box-shadow property, for example box-shadow: 0px 10px 25px 0px rgba(10, 43, 39, 0.2);. The numbers are the horizontal offset, the vertical offset, the blur, the spread and the colour. Copy the code from this tool and paste it into your style.
Yes. Separate the shadows with commas, and the first one sits on top. This tool lets you add up to five layers and writes the code for you. Layered shadows look softer and more natural than one big shadow.
An inset shadow is drawn inside the box instead of outside it. It makes the box look pressed in, and it is often used on input fields and pressed buttons.
Blur makes the edge of the shadow soft. Spread makes the whole shadow bigger, or smaller if the number is negative, before the blur is applied.
box-shadow follows the rectangle of the element, including its rounded corners. The drop-shadow filter follows the real outline of the content, so it also works on transparent images and shapes.
A few shadows cost almost nothing. Very large blurs on many elements, or on elements that move, can slow older phones, so keep blur values reasonable and avoid animating shadows on long lists.
Yes. The box-shadow property works in all current browsers, and the code from this tool needs no prefixes.