Tailwind CSS Handbook v4.3

Filters & Effects

Blur, brightness, contrast, grayscale and the rest of the filter chain, plus backdrop filters, blend modes and opacity.

Filters apply graphical effects to an element's rendered pixels. Backdrop filters apply them to whatever is behind the element.

Filter utilities#

UtilityRangeEffect
blur-xs … blur-3xlGaussian blur
brightness-0 … brightness-2000–200%Lighten or darken
contrast-0 … contrast-2000–200%Tonal separation
grayscale / grayscale-0Desaturate
saturate-0 … saturate-2000–200%Colour intensity
sepia / sepia-0Warm tone
invert / invert-0Invert colours
hue-rotate-90degreesShift hue
drop-shadow-*Shape-following shadow
filter-noneRemove all filters
Loading preview…

Filters compose#

Multiple filter utilities on one element chain together in the order Tailwind emits them:

HTML
<img class="grayscale contrast-125 brightness-95" src="…" alt="">

Backdrop filters#

These affect the area behind a translucent element. The element must have a semi-transparent background for the effect to be visible.

UtilityEffect
backdrop-blur-xs … backdrop-blur-3xlFrost the backdrop
backdrop-brightness-* backdrop-contrast-*Tonal adjustment
backdrop-grayscale backdrop-saturate-* backdrop-sepia backdrop-invertColour adjustment
backdrop-filter-noneRemove
Loading preview…

Opacity#

UtilityValue
opacity-0 … opacity-100In steps of 5
opacity-[0.67]Arbitrary
HTML
<div class="opacity-50">Whole element at 50%</div>
<div class="bg-black/50">Only the background at 50%</div>

Blend modes#

UtilityPurpose
mix-blend-*Blend an element with what is behind it
bg-blend-*Blend an element's background layers together

Available modes: normal, multiply, screen, overlay, darken, lighten, color-dodge, color-burn, hard-light, soft-light, difference, exclusion, hue, saturation, color, luminosity, plus-darker, plus-lighter.

Loading preview…

mix-blend-multiply is useful for tinting images; mix-blend-luminosity desaturates an element against a colourful backdrop.

Common patterns#

Image that colourises on hover#

Loading preview…

Blurred loading placeholder#

HTML
<img class="blur-sm transition duration-500 data-[loaded=true]:blur-none" src="/thumb.jpg" alt="">

Disabled overlay#

HTML
<div class="relative">
  <div class="pointer-events-none opacity-40 grayscale">…form…</div>
  <div class="absolute inset-0 grid place-items-center">
    <span class="rounded bg-white px-3 py-1 text-sm shadow">Read only</span>
  </div>
</div>

pointer-events-none is essential — without it, the faded content is still clickable and focusable.

Dark-mode image adjustment#

HTML
<img class="dark:brightness-90 dark:contrast-105" src="/photo.jpg" alt="">

Bright photos glare on a dark background; a small brightness reduction reads much better than swapping assets.

Frosted navigation bar#

HTML
<header class="sticky top-0 z-40 border-b border-gray-200/70 bg-white/80 backdrop-blur-md dark:border-white/10 dark:bg-gray-900/80">
  …
</header>

Accessibility#

  • prefers-reduced-transparency is not yet a Tailwind variant, but heavy blur reduces text contrast. Keep a solid fallback colour under any frosted surface.
  • invert and hue-rotate do not make a dark theme. They invert images and break brand colours. Build a real dark palette — see Dark Mode.
  • Never convey state with a filter alone. A greyed-out item should also be marked aria-disabled or removed from the tab order.

Common mistakes#

  • backdrop-blur with an opaque background. There is nothing to see through; the element needs bg-*/opacity.
  • Using v3 blur names. blur-sm is now much lighter.
  • opacity-0 to hide interactive content. It stays focusable and announced. Add pointer-events-none or use hidden.
  • Animating filter or backdrop-filter. Expensive; prefer opacity or transform.
  • Filters on a parent of a fixed child. Any filter creates a containing block, so the child is no longer viewport-fixed — see Position.