Box Shadow Generator with Layers and Tailwind
Stack multiple box-shadow layers with live preview and copy the CSS or a Tailwind shadow-[] class
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
shadow-[0_10px_15px_-3px_rgba(0,0,0,0.1),0_4px_6px_-4px_rgba(0,0,0,0.1)]
How CSS box-shadow works
The box-shadow property takes up to six parts per shadow: an optional inset keyword, a horizontal offset, a vertical offset, a blur radius, a spread radius and a colour. Positive x moves the shadow right, positive y moves it down. Blur softens the edge; a value of 0 gives a hard, graphic shadow. Spread grows or shrinks the shadow before blurring, so a negative spread tucks the shadow under the element and stops it bleeding out at the sides, which is how most modern card shadows avoid looking muddy.
inset draws the shadow inside the border instead of outside, making an element look pressed in. It is the basis of input fields with inner depth and of the pressed state in neumorphism.
The shadow follows the element's border-radius, so the corner radius slider in this tool changes the shadow shape too. Box shadows do not affect layout: they never push neighbouring elements around, but they can be clipped by a parent with overflow: hidden, so give the parent some padding if the edge looks cut off.
Layered shadows, elevation and neumorphism
A single CSS box shadow usually looks flat because real light produces a tight, dark contact shadow and a wide, faint ambient one at the same time. The property accepts a comma-separated list, and stacking two to five layers with increasing offset and blur gives a far more natural result. The Layered smooth preset uses five layers that double in size each time at low opacity, a technique popularised by designers writing about smoother shadows. Elevation 1 and Elevation 3 mirror the two-layer pattern of a small and large drop that design systems use for raised cards and menus.
In this box shadow generator each layer is listed separately. Select one to edit it, hide it with the eye icon to compare the result with and without it, or remove it. Layers are drawn in order, so the first one in the list sits on top.
A neumorphism shadow pairs a dark shadow offset down and right with a light shadow offset up and left, on an element the same colour as its background. Both neumorphism presets set the background and box to the same soft grey for that reason; with a contrasting background the effect disappears. Use it sparingly: the low contrast that makes neumorphic controls look soft also makes their edges hard to see for people with low vision, so pair it with a visible focus style and clear labels.
Copying CSS and Tailwind output
The CSS block contains a ready box-shadow declaration, one layer per line when there are several. Hidden layers are left out. The Tailwind arbitrary value writes the same layers as a shadow-[...] class with underscores for spaces and commas between layers, the syntax Tailwind uses for arbitrary values. That is the practical way to get a box-shadow Tailwind class that matches a design exactly instead of the nearest built-in shadow-md or shadow-lg. Because the class contains literal rgba() values, it does not change with your Tailwind theme; if you want shadows that follow design tokens, define the value once as a CSS variable or a theme shadow and reference it instead. Nothing leaves your browser while you work.
How to use the Box Shadow Generator with Layers and Tailwind tool
- 1
Start from a preset
Pick Soft, Elevation, Layered smooth, Neumorphism, Glow or Hard offset to load a set of layers.
- 2
Edit or add layers
Select a layer and adjust its x and y offset, blur, spread, opacity, colour and inset; add up to eight layers.
- 3
Match your surface
Set the background, box colour and corner radius so the preview looks like the place the shadow will be used.
- 4
Copy the code
Copy the box-shadow CSS or the Tailwind shadow-[] arbitrary value.
Frequently asked questions
How do I add more than one box shadow to an element?
Separate the shadows with commas in a single box-shadow declaration, for example box-shadow: 0 1px 2px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.1);. The first shadow in the list is drawn on top.
What does spread do in box-shadow?
Spread expands the shadow in every direction before it is blurred; a negative value shrinks it. A negative spread with a positive y offset keeps the shadow under the element so it only shows at the bottom.
How do I make a neumorphism shadow in CSS?
Give the element the same colour as its background, then add a dark shadow offset to the bottom right and a light shadow offset to the top left, such as 9px 9px 16px and -9px -9px 16px. Add inset to both for a pressed look.
How do I use a custom box shadow in Tailwind?
Use an arbitrary value: shadow-[0_4px_6px_-1px_rgba(0,0,0,0.1)]. Spaces become underscores and multiple layers are separated by commas. This tool writes the class for you.
Related on TechLogHub
Related CSS Tools
CSS Minifier with Before and After Byte Counts
Minify CSS by removing whitespace and comments
CSS Gradient Generator: Linear, Radial, Conic
Build linear, radial and conic gradients with multiple colour stops and copy the CSS or Tailwind class
Border Radius Generator with Blob Shapes
Round each corner or shape organic blobs with 8-value border-radius and copy CSS or Tailwind
Flexbox Generator with Tailwind Classes
Build flex layouts visually, tune container and item properties, and copy CSS or Tailwind classes
CSS Grid Generator with Template Areas
Define grid tracks, paint named grid-template-areas and copy the CSS and HTML skeleton
CSS Clamp Calculator for Fluid Typography
Calculate fluid clamp() values from min and max sizes and viewports, with a fluid type scale mode
Get the next tool before you need it
One email a week: new and trending developer tools, fresh comparisons, and what shipped. Unsubscribe in one click.

