Simple Online Tools

CSS Box-Shadow Generator

Visually create and customize CSS `box-shadow` properties with ease.

Controls

Preview

Shadow Box

Understanding CSS Box Shadows

The CSS box-shadow property allows you to add shadow effects around an element's frame. You can set multiple shadows, control their color, size, blur, and position, and even make them appear inside the element.

A `box-shadow` is defined by a series of values:

  • `offset-x` (required): The horizontal offset of the shadow. Positive values cast the shadow to the right, negative to the left.
  • `offset-y` (required): The vertical offset of the shadow. Positive values cast the shadow downwards, negative upwards.
  • `blur-radius` (optional): The blur distance. A larger value means a more blurred shadow. Default is 0.
  • `spread-radius` (optional): The spread distance. Positive values expand the shadow, negative values shrink it. Default is 0.
  • `color` (optional): The color of the shadow. If not specified, it defaults to the current text color.
  • `inset` (optional): If specified, changes the shadow from an outer shadow (outset) to an inner shadow.

Experimenting with these values allows for a wide range of visual effects, from subtle depth to dramatic glows. This generator simplifies the process by providing interactive sliders and a live preview, making it easy to fine-tune your shadows without writing a single line of code manually.

Remember that `box-shadow` can significantly impact the visual hierarchy and user experience of your web elements. Use them thoughtfully to guide the user's eye and enhance the overall design.