Box Shadow In Tailwind CSS
In this article, we are going to look closely at Tailwind box shadow with examples in order to gain a deeper understanding of how it works.
Tailwind Box Shadow class allows us to adjust the box-shadow of an element.
CSS Shadow Effect properties are used to achieve this in CSS.
In Tailwind CSS, this class accepts multiple values. These properties are covered in class form.
Syntax
<element class="shadow-{shadow-depth}">....</element>
Tailwind Box Shadow Classes
Classes | Overview |
shadow-sm | The objective of this class is to produce a subtle shadow or faded effect on an element. |
shadow | The aim of this class is to create a normal shadow effect on an element. |
shadow-md | This class helps in creating a medium sized shadow on an element. |
shadow-lg | Using this class a large sized shadow is applied on an element. |
shadow-xl | An extra-large shadow is applied across an element using this class. |
shadow-2xl | This class applies a double extra large shadow on an element. |
shadow-inner | This class is unique as it applies shadow effects inside the element. |
shadow-none | All shadow effects are removed using this class. |
For better understanding, below example illustrates the use of shadow-none and shadow-md classes:
Example: 
Below example showcases the application of shadow-sm and shadow-lg classes:
Example: 
Here is a brief example of shadow and shadow-xl classes in action:
Example: 
The following example utilizes the shadow-inner and shadow-2xl classes in Tailwind: