How to use the box shadow generator
- Drag Elevation for an instant smooth shadow made of several layers.
- Select a layer to fine-tune its offset, blur, spread, color and opacity, or make it inset.
- Add up to eight layers for complex effects.
- Set the background, box color and corner radius to match your design.
- Copy the CSS or the Tailwind arbitrary-value class.
Why one shadow looks fake
Real shadows are sharp and dark close to an object and soft and faint further away. A single box-shadow can only do one of those. Stacking several layers, each with double the offset and blur of the one before and a lower opacity, reproduces the falloff. The Elevation slider builds exactly that stack.
Tips
- Tint shadows with the background’s hue instead of pure black; dark navy or brown reads more naturally.
- Keep the light source consistent: all shadows on a page should fall the same way.
- Use bigger elevation for things that float (menus, dialogs) and little or none for things at rest.
- Many layers with large blur cost rendering time on long scrolling lists; three or four is plenty.
Questions
What do the four numbers in box-shadow mean?
Horizontal offset, vertical offset, blur radius and spread radius, followed by the color. 'inset' at the start puts the shadow inside the box.
Can I use the result in Tailwind?
Yes. The Tailwind tab gives an arbitrary-value class such as shadow-[0_4px_12px_0_rgb(0_0_0/0.16)] that works without config.