tailwind-css
  1. tailwind-css-box-shadow-color

Tailwind CSS Box Shadow Color

The Tailwind CSS framework provides a range of utility classes that can be used to add box-shadow to elements. This page will cover the box-shadow color utility classes.

Syntax

The syntax for the box-shadow color utility classes is as follows:

<div class="shadow-{color}-{intensity}">
  <!-- Your content here -->
</div>
  • {color} specifies the color of the box-shadow. The available options are blue, indigo, purple, pink, red, orange, yellow, green, teal, and gray.
  • {intensity} specifies the intensity of the box-shadow. The available options are 100, 200, 300, 400, 500, 600, 700, 800, 900, and none.

Example

Here is an example of how to use the box-shadow color utility class:

<div class="shadow-blue-600">
  This div has a blue box-shadow with an intensity of 600.
</div>

Output

The above example will result in the following output:

Tailwind CSS Box Shadow Color Example

Explanation

The shadow-blue-600 class adds a box-shadow to the element with a blue color and an intensity of 600.

Use

Use the box-shadow color utility classes to add a box-shadow to an element with a specific color and intensity.

Important Points

  • The available color options are blue, indigo, purple, pink, red, orange, yellow, green, teal, and gray.
  • The available intensity options are 100, 200, 300, 400, 500, 600, 700, 800, 900, and none.
  • You can combine other Tailwind CSS utility classes with the box-shadow color utility classes to further style your elements.

Summary

The box-shadow color utility classes in Tailwind CSS allow you to add a box-shadow to your elements with a specific color and intensity. This is a useful tool for adding depth and dimension to your designs.

Published on: