Box Shadow

Create CSS box shadow effects

Box Shadow Preview
box-shadow: 4px 4px 8px 0px rgba(0, 0, 0, 0.25);

Generate CSS box-shadow properties with visual controls. Adjust offset, blur, spread, and opacity for perfect shadows.

What is CSS Box Shadow Generator?

CSS box-shadow adds depth and visual hierarchy to elements by creating drop shadows. The property controls offset (horizontal/vertical position), blur radius (softness), spread radius (shadow size), color, and opacity. Shadows enhance UI cards, buttons, and containers, making flat designs feel three-dimensional. This visual generator lets you design shadows interactively.

How to Use

  1. Adjust sliders for Offset X and Offset Y (shadow position)
  2. Set Blur radius for shadow softness
  3. Adjust Spread for shadow size expansion
  4. Pick color and adjust opacity percentage
  5. Toggle Inset for inner shadows
  6. Click presets for quick starting points
  7. Copy generated CSS to your stylesheet

Why Use This Tool?

Visual shadow design - see changes instantly
Fine-tune all shadow parameters
Presets for common shadow styles
RGBA color with adjustable opacity
Inset shadows for depth effects
Copy-ready CSS code

Tips & Best Practices

  • Subtle shadows (low opacity) look professional
  • Card shadows: small offset, moderate blur
  • Neon effects: no offset, high blur, bright color
  • Inset shadows create pressed/inset appearance
  • Negative spread makes tighter shadows
  • Multiple shadows via multiple values

Frequently Asked Questions

What does each parameter mean?

Offset X/Y: shadow position relative to element. Blur: how soft/fuzzy the shadow edges. Spread: expands or contracts shadow size. Color + Opacity: shadow color and transparency. Inset: shadow appears inside element instead of outside.

How do I make subtle shadows?

Use low opacity (10-15%), small offset (0-4px), moderate blur (4-12px). Preset 'Subtle' or 'Card' show ideal subtle shadow values. Subtle shadows enhance without dominating the design.

What is inset shadow?

Inset shadows appear inside the element, creating a pressed or sunken effect. Useful for buttons (pressed state), input fields, and depth illusions. Toggle 'Inset' checkbox to switch from outer to inner shadow.

How do I create neon/glow effects?

Set offset to 0, high blur (20-50px), spread to 0, and use bright colors at full opacity. The 'Neon' preset demonstrates this. Multiple shadows with different blur values create layered glow effects.

Can I have multiple shadows?

Yes - CSS supports multiple shadows separated by commas: box-shadow: shadow1, shadow2, shadow3. Create layered effects, different colored shadows, or combined inset/outer shadows. Manually add additional values to copied CSS.

Why use RGBA instead of hex?

RGBA allows opacity control separate from color. Hex opacity requires alpha channel (#RRGGBBAA) which has limited support. RGBA is standard for shadow opacity. The tool converts your color to RGBA with adjustable transparency.

Related Tools