About the Box Shadow Generator
Soft shadows, hard offset shadows or inner glows: adjust the sliders until it looks right and copy the code.
Shadows give interfaces depth: cards look raised, buttons look pressable and modals stand out from the page. The CSS box-shadow property is powerful but has five values plus a colour and an inset keyword, which makes it hard to picture from code. This generator lets you shape the shadow with sliders and see it instantly.
Adjust the horizontal and vertical offset, blur radius and spread, pick a colour and opacity, and switch to inset for inner shadows. A corner radius control rounds the preview box so you can see how the shadow looks on your actual component. Copy the generated box-shadow line when it looks right.
Large blur values create soft, diffuse shadows that suggest an element floating high above the page, while small blur and offset values look like an element resting close to the surface. Design systems often define three to five shadow levels and reuse them everywhere.
How to use the Box Shadow Generator
- 1Move the sliders for offset, blur and spread.
- 2Pick a colour and opacity, or switch to inset.
- 3Copy the box-shadow CSS.
Key features
- Horizontal and vertical offset.
- Blur and spread sliders.
- Colour with opacity.
- Inset shadows.
- Preview with adjustable corner radius.
Practical uses
- Card and panel elevation in a design system.
- Pressed and hover states for buttons.
- Inner shadows for input fields.
- Hard offset shadows for retro or neo-brutalist styles.
Example
Offsets of 0 and 8px, 24px blur, −4px spread and black at 15% opacity give box-shadow: 0px 8px 24px -4px rgba(0, 0, 0, 0.15), a soft shadow suited to floating cards.
Tips and common mistakes
- Use low opacity for realistic shadows; pure black at full strength looks harsh.
- Keep the light direction consistent across all shadows on a page.
- Combine a tight shadow and a soft one, separated by a comma, for realistic depth.
Limitations
- One shadow is generated at a time.
- Filter drop-shadow for transparent images is not covered.
Privacy
Settings are processed locally.
Frequently asked questions
What is spread?
Spread grows or shrinks the shadow before it is blurred.
Can I use several shadows?
CSS allows a comma-separated list of shadows. Copy one result, change the sliders, and join both with a comma.
Do shadows slow down pages?
Static shadows are cheap. Animating large blurred shadows can be slow on phones.
What does a negative spread do?
It shrinks the shadow before blurring, which keeps the shadow under the element and avoids a halo on the sides.
Can I use a coloured shadow?
Yes. Pick any colour; coloured shadows that match the element’s colour create a glowing effect.