Generators
CSS Box Shadow Generator
Design a CSS box shadow with sliders and copy the CSS.
Free foreverRuns in your browserNo sign-up
box-shadow: 0px 10px 25px -5px #0F172A40;Adjust the sliders to shape the shadow, then copy the CSS. Colour opacity is baked into the hex value.
About the CSS Box Shadow Generator
The CSS box-shadow property adds depth to elements with an offset, blur, spread and colour. Getting the values right by hand can be fiddly.
This tool gives you sliders for each value with a live preview, then hands you the exact CSS to copy.
You can also make the shadow inset to create a recessed effect.
Key features
- Sliders for offset, blur, spread and opacity
- Colour picker with opacity baked into the value
- Inset shadow toggle
- Live preview and copy CSS
How to use
- 1Adjust the offset, blur, spread and opacity sliders.
- 2Pick a shadow colour and toggle inset if needed.
- 3Copy the box-shadow CSS.
Examples
Soft drop shadow
Output:
box-shadow: 0px 10px 25px -5px #0F172A40;A downward offset with blur and a slightly negative spread creates a soft, modern shadow.
Frequently asked questions
- What do the four lengths mean?
- In order: horizontal offset, vertical offset, blur radius and spread radius. Positive offsets move the shadow right and down.
- How is opacity handled?
- The chosen opacity is converted to an alpha value and appended to the hex colour, so the copied CSS is self-contained.
- What is an inset shadow?
- An inset shadow is drawn inside the element's edges, creating a pressed-in or recessed look instead of a raised one.
