TFT

Box Shadow Generator

Create beautiful CSS box shadows with multiple layers, inset support, and live preview.

Shadow Layers
Presets
Live Preview
Generated CSS
0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)
.shadow { box-shadow: 0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06); }
shadow-[0px_4px_6px_-1px_rgba(0,_0,_0,_0.1),_0px_2px_4px_-1px_rgba(0,_0,_0,_0.06)]

What Box Shadow Does

Box shadow adds depth to elements without images. You can stack multiple shadows, push them in any direction, blur the edges, and even create inner shadows for inset effects.

The syntax looks intimidating at first - offset-x, offset-y, blur, spread, color, inset - but each property does one thing. This generator shows you what each value actually does before you copy the CSS.

Box Shadow Properties

Offset X & Y
Horizontal and vertical distance from the element. Positive X pushes right, positive Y pushes down. Negative values go left and up.
Blur Radius
How soft the shadow edges are. Zero creates a hard edge. Higher values create softer, more diffused shadows that look more natural.
Spread Radius
Expands or shrinks the shadow size. Positive makes it larger, negative makes it smaller. Often used with blur for layered shadow effects.
Inset
Changes from outer shadow to inner shadow. Creates the appearance of elements being pressed in or having inner depth.

When to Use Box Shadow

1

Card elevation

Subtle shadows make cards appear to float above the background. Use low opacity (0.05-0.15) with moderate blur for a natural look.

2

Button states

Increase shadow on hover to simulate lifting. Decrease or use inset shadow for pressed states.

3

Focus rings

Colored shadows create visible focus indicators without affecting layout. Better than outlines for custom designs.

Tips for Natural Shadows

  • Use multiple layers: Stack 2-3 shadows with different blur values for realistic depth.
  • Keep opacity low: Real shadows are subtle. Start at 0.1 and adjust from there.
  • Match your light source: If shadows go down-right, keep all elements consistent.
  • Colored shadows: Use your brand color at very low opacity for a modern touch.

What Box Shadow Does

Box shadow adds depth to elements without images. You can stack multiple shadows, push them in any direction, blur the edges, and even create inner shadows for inset effects.

The syntax looks intimidating at first - offset-x, offset-y, blur, spread, color, inset - but each property does one thing. This generator shows you what each value actually does before you copy the CSS.

Box Shadow Properties

Offset X & Y
Horizontal and vertical distance from the element. Positive X pushes right, positive Y pushes down. Negative values go left and up.
Blur Radius
How soft the shadow edges are. Zero creates a hard edge. Higher values create softer, more diffused shadows that look more natural.
Spread Radius
Expands or shrinks the shadow size. Positive makes it larger, negative makes it smaller. Often used with blur for layered shadow effects.
Inset
Changes from outer shadow to inner shadow. Creates the appearance of elements being pressed in or having inner depth.

When to Use Box Shadow

1

Card elevation

Subtle shadows make cards appear to float above the background. Use low opacity (0.05-0.15) with moderate blur for a natural look.

2

Button states

Increase shadow on hover to simulate lifting. Decrease or use inset shadow for pressed states.

3

Focus rings

Colored shadows create visible focus indicators without affecting layout. Better than outlines for custom designs.

Tips for Natural Shadows

  • Use multiple layers: Stack 2-3 shadows with different blur values for realistic depth.
  • Keep opacity low: Real shadows are subtle. Start at 0.1 and adjust from there.
  • Match your light source: If shadows go down-right, keep all elements consistent.
  • Colored shadows: Use your brand color at very low opacity for a modern touch.