CSS Box Shadow Generator: box-shadow syntax explained

Start with the task you actually need to finish

  • Styling cards, pricing tables and modals.
  • Creating hover and focus effects for buttons.
  • Designing neumorphic dashboards.

Follow the workflow and review the result

  1. Pick a preset or start with the default layer.
  2. Adjust offset, blur, spread and opacity with the sliders.
  3. Choose a colour and toggle inset if needed.
  4. Add more layers with + for softer, more realistic shadows.
  5. Copy the CSS or Tailwind class into your project.

box-shadow syntax explained

box-shadow: [inset] offset-x offset-y blur spread colour. Positive x moves the shadow right, positive y moves it down. Blur softens the edge. Spread makes the shadow bigger (positive) or smaller (negative). Separate several shadows with commas; the first one is drawn on top.

Tips for realistic shadows

Use low opacity (5–20%), keep the light source consistent (usually from the top, so y is positive), use a small negative spread for large blurs, and layer two shadows: one close and sharp, one far and soft.

Performance

Shadows are cheap for static elements. Animating large blurred shadows can be slow on mobile; animate opacity of a pseudo-element with the shadow instead.