Settings
10px
10px
20px
5px
60%
Preview
Element
Generated CSS Code
box-shadow: 5px 5px 10px 0px rgba(0,0,0,0.3);
How to use?

Adjust the settings on the left to generate CSS code for the box-shadow property. The preview will show how the element will look with the applied shadow effect.

  • Horizontal Offset: Controls the shadow's position on the x-axis (positive values move right, negative values move left)
  • Vertical Offset: Controls the shadow's position on the y-axis (positive values move down, negative values move up)
  • Blur Radius: Determines how blurry the shadow appears (higher values create more blur)
  • Spread Radius: Expands or shrinks the shadow size (positive values expand, negative values contract)
  • Inset Shadow: When checked, creates an inner shadow instead of an outer shadow
About Box Shadow Generator

What is Box Shadow?

The box-shadow CSS property adds shadow effects around an element's frame. You can set multiple effects separated by commas. A box shadow is described by X and Y offsets relative to the element, blur and spread radius, and color.

Why Use Box Shadow Generator?

Creating the perfect shadow effect for your web elements can be challenging, especially when trying to achieve specific visual results. Our Box Shadow Generator simplifies this process by providing:

  • Visual Preview: See your changes in real-time as you adjust the settings
  • Intuitive Controls: Use sliders to easily adjust each aspect of the shadow
  • Color Opacity Control: Fine-tune the transparency of your shadow
  • Inset Shadow Option: Create both outer and inner shadow effects
  • Ready-to-Use Code: Copy the generated CSS code with a single click

How to Use the Generator

Using our Box Shadow Generator is simple:

  1. Adjust the horizontal and vertical offset sliders to position your shadow
  2. Use the blur radius slider to control how soft or sharp the shadow appears
  3. Set the spread radius to determine the size of the shadow
  4. Choose a shadow color and adjust its opacity
  5. Toggle the "Inset Shadow" option if you want an inner shadow effect
  6. Preview your changes in real-time on the right panel
  7. Copy the generated CSS code when you're satisfied with the result

Box Shadow in Web Design

Box shadows are a fundamental element in modern web design, used to create depth, emphasis, and visual hierarchy. They can:

  • Make UI elements appear elevated or "floating" above the page
  • Highlight important content or call-to-action buttons
  • Create subtle separation between sections or cards
  • Add a sense of depth and dimension to flat designs
  • Enhance user experience by providing visual feedback for interactive elements

Browser Compatibility

The box-shadow property is supported in all modern browsers:

  • Chrome 10+
  • Firefox 4+
  • Safari 5.1+
  • Opera 10.5+
  • Internet Explorer 9+
  • Edge (all versions)

For older browsers, you might need to use vendor prefixes like -webkit-box-shadow, -moz-box-shadow, etc. Our generator provides the standard property which works in all modern browsers.