CSS Design Tools

Box Shadow Generator

Preview

Position

0px
8px
24px
-4px

Color

12%

Presets

CSS

Copy this into your stylesheet.

box-shadow: 0px 8px 24px -4px rgba(24, 24, 27, 0.12);

What is a CSS Box Shadow Generator?

This box shadow generator helps you create `box-shadow` values with visual controls for offset, blur, spread, and color.

It removes trial-and-error by showing live depth changes and outputting copy-ready CSS.

How to use

  1. Select outer or inset shadow mode.
  2. Adjust horizontal and vertical offsets to define light direction.
  3. Tune blur and spread for softness and shadow size.
  4. Pick a color and set opacity for subtle or strong depth.
  5. Copy the CSS and apply it to cards, buttons, or containers.

Example usage

A low-opacity outer shadow works well for elevated cards. Inset shadows can create pressed inputs or tactile UI states.

Tips

  • Prefer lower opacity for more natural shadows.
  • Keep light direction consistent across components.
  • Avoid excessive spread on small elements.
  • Use one clean shadow first, then layer only if needed.

FAQ

When should I use inset shadows?
Use inset shadows when you want a surface to look pressed in or carved, such as input fields or recessed panels.
What units does this tool output?
Offsets, blur, and spread are generated in pixels for predictable results.
Can I animate box-shadow?
Yes, but keep animations minimal because heavy shadow transitions can impact performance on large pages.