Shadows, Opacity & Filters in Tailwind CSS

From the Tailwind CSS cheat sheet · Effects & Filters · verified Nov 2026

Shadows, Opacity & Filters

Box shadows, opacity, and visual filters.

html
<!-- Box shadows -->
<div class="shadow-sm">Small shadow</div>
<div class="shadow-lg">Large shadow</div>
<div class="shadow-xl/20">20% opacity shadow</div>
<div class="shadow-lg shadow-blue-500/25">Colored shadow</div>

<!-- Opacity -->
<div class="opacity-50">50% transparent</div>

<!-- Filters -->
<img class="blur-sm" />
<img class="grayscale" />
<div class="backdrop-blur-md bg-white/30">Glass effect</div>
💡 shadow-xl/20 adds opacity to shadows — makes them subtle and professional
⚡ backdrop-blur-md + bg-white/30 creates the popular frosted glass effect
📌 Shadow colors (shadow-blue-500/25) create modern colored shadow effects
🟢 Use inset-shadow-sm for inset shadows (replaces shadow-inner) - great for pressed buttons
shadowsopacityfiltersblurbackdrop

Continue with Tailwind CSS

Save the full cheat sheet or work through every related task.

Back to the full Tailwind CSS cheat sheet