Learn how to apply visual effects like blur, brightness, contrast, and more to your elements using Tailwind's filter utilities.
Tailwind CSS provides a comprehensive set of filter utilities that allow you to apply visual effects to your elements. These filters are particularly useful for image manipulation, creating depth effects, and enhancing visual appeal.
The blur filter applies a Gaussian blur to the element. Larger values create more intense blur effects.
blur-none
blur-none
blur-sm
blur-sm
blur-md
blur-md
blur-xl
blur-xl
The brightness filter adjusts the brightness of the element. Values below 100% darken, values above 100% brighten.
brightness-50
brightness-50
brightness-100
brightness-100
brightness-125
brightness-125
brightness-150
brightness-150
The contrast filter adjusts the contrast of the element. Higher values increase the difference between light and dark colors.
contrast-50
contrast-50
contrast-100
contrast-100
contrast-150
contrast-150
contrast-200
contrast-200
Tailwind provides several filters for color manipulation effects like grayscale, sepia, invert, and hue-rotate.
grayscale
grayscale
sepia
sepia
invert
invert
hue-rotate-180
hue-rotate-180
The saturate filter adjusts the color saturation of an element. Higher values create more vivid, intense colors.
saturate-50
saturate-50
saturate-100
saturate-100
saturate-150
saturate-150
saturate-200
saturate-200
grayscale brightness-125)
hover:grayscale-0)
Code Example:
<div class="group relative overflow-hidden">
<img class="grayscale group-hover:grayscale-0
transition-all duration-300" src="image.jpg">
</div>
Using blur filters to create modern UI effects.
Code Example:
<div class="relative">
<div class="absolute inset-0 blur-xl bg-gradient-to-r
from-indigo-500 to-purple-500"></div>
<div class="relative bg-white/80 backdrop-blur-sm">
Content here
</div>
</div>