How to use the box shadow generator
- Start from a preset such as Soft, Raised, Smooth layers, Hard offset, Glow or Pressed – or keep the default.
- Pick a layer with the numbered buttons under Shadow layers, then adjust Horizontal offset, Vertical offset, Blur, Spread, Colour and Opacity. Switch on Inset (inner shadow) for a recessed look.
- Add layer stacks another shadow; the arrow buttons reorder layers and the cross removes one.
- Match your design under Box: set the Box colour, Background colour and Corner radius so the preview looks like your page.
- Press Copy CSS, or Copy class for the Tailwind version, and paste it into your project.
Features
- Up to six shadow layers, each with offsets from −100 to 100 pixels, blur up to 150 pixels and spread from −50 to 100 pixels.
- Colour in HEX, rgb() or hsl(), with a separate opacity slider that is combined with any transparency in the colour.
- Inset shadows, and inset and outer layers mixed in one declaration.
- Preview on your own box colour, background colour and corner radius.
- Six original presets, from a subtle card shadow to a coloured glow and a retro hard offset.
- Tidy output: zero values written as 0 and colours as rgb() with a slash for transparency.
- A Tailwind CSS arbitrary-value class generated from the same shadow.
Tips for natural-looking shadows
Light usually comes from above, so most shadows look right with a horizontal offset of 0 and a small positive vertical offset. Keep the opacity low – between 8% and 20% for everyday interface shadows – and use a dark blue-grey rather than pure black, which can look muddy on coloured backgrounds.
For elevation, make the shadow larger and softer the higher the element should appear. A card resting on the page might use a 1px and an 8px layer; a dialog floating above everything might use layers up to 32px or more. A small negative spread keeps large blurs from spilling out to the sides.
Coloured glows work best on dark backgrounds. Use the element's own brand colour, an offset of 0, a generous blur and a little spread. If the element also has a gradient, build it in the CSS gradient generator and take one of its colours for the glow.
Box shadows and rounded corners
The shadow follows the element's border radius automatically, which is why the preview has a Corner radius slider. If you are preparing images for a page rather than CSS boxes, round image corners gives a picture the same rounded shape. To convert a colour from a design file into a format you prefer, use the colour converter.
Why use Fileora's box shadow generator
Tweaking box-shadow numbers in a stylesheet is slow, especially with several layers. Here every slider updates the preview instantly, you can compare presets with one click, and the CSS is always in sync with what you see. It is free, needs no account, works on mobile and runs entirely in your browser.