CSS Shadow Generator
Tune layered box shadows with presets and a live preview.
How to use the CSS Shadow Generator
- 1Adjust offset, blur, spread and color, or start from a preset.
- 2Stack several layers for softer, more realistic depth.
- 3Copy the CSS or the Tailwind class into your project.
About CSS Shadow Generator
The CSS Shadow Generator helps you build box shadows visually. Adjust the horizontal and vertical offset, blur, spread, color and opacity of a shadow, switch a layer to inset to draw it inside the box, and stack up to six layers for softer, more realistic depth. Presets such as Soft, Elevated, Crisp, Layered, Inset and Glow give a quick starting point.
The live preview lets you change the box color, the background and the border radius, so you can judge the shadow on light or dark surfaces and on rounded cards or buttons. The result is a ready box-shadow declaration with rgba colors to copy into your stylesheet, along with an equivalent Tailwind arbitrary-value class, shadow-[…], for projects that use Tailwind CSS.
Front-end developers and UI designers use the CSS Shadow Generator to define elevation levels for cards, dropdowns, dialogs and buttons, to add a colored glow, or to rebuild a shadow from a design file. Layering several faint shadows with growing blur is a common technique for natural-looking depth, and the Layered preset shows how it works.
Frequently asked questions
What do the values in box-shadow mean?
In order: horizontal offset, vertical offset, blur radius, spread radius and color, for example box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.15). The optional keyword inset puts the shadow inside the element.
How do I add multiple shadows to one element?
Separate them with commas in a single box-shadow declaration. The first shadow in the list is drawn on top, and each one can have its own offset, blur, spread and color.
What is the difference between box-shadow and drop-shadow?
box-shadow follows the element's box and border radius. The filter drop-shadow() follows the visible shape, including transparent parts of images and SVGs, but has no spread or inset. This tool generates box-shadow.
What does spread do in a CSS shadow?
Spread enlarges the shadow in all directions before it is blurred, or shrinks it with a negative value. A negative spread combined with a vertical offset gives a shadow that shows only below the element.
More in Design & Color
Build harmonious color schemes with contrast checks and CSS export.
Design linear, radial, conic and mesh gradients and copy the CSS.
Turn text, emoji or an image into a complete favicon set.