3 min read
•Question 13 of 38easyHow to use Box Shadows in Tailwind?
Shadow utilities and customization.
What You'll Learn
- Shadow scale
- Shadow colors
- Ring utility
Shadow Classes
index.htmlHTML
<div class="shadow-sm">Small shadow</div>
<div class="shadow">Default shadow</div>
<div class="shadow-md">Medium shadow</div>
<div class="shadow-lg">Large shadow</div>
<div class="shadow-xl">XL shadow</div>
<div class="shadow-2xl">2XL shadow</div>
<div class="shadow-none">No shadow</div>Shadow Colors
index.htmlHTML
<div class="shadow-lg shadow-blue-500/50">
Blue tinted shadow with 50% opacity
</div>Ring Utility
index.htmlHTML
<button class="focus:ring-2 ring-blue-500">
Focus ring around element
</button>
<div class="ring-2 ring-offset-2 ring-blue-500">
Ring with offset
</div>Inner Shadow
index.htmlHTML
<div class="shadow-inner">Inset shadow</div>