The Wayback Machine - https://web.archive.org/web/20240620204347/https://www.geeksforgeeks.org/tailwind-css-backdrop-blur/
Open In App

Tailwind CSS Backdrop Blur

Last Updated : 23 Mar, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

The backdrop blur classes is used to apply a blurred effect filter to an element. Tailwind CSS newly added feature blur in 2.1 version.

Backdrop Blur Classes:

  • backdrop-blur-0: This class is equivalent to no blur effect on element as blur(0) in CSS.
  • backdrop-blur-sm: This class is equivalent to small blur effect on element as blur(4px) in CSS.
  • backdrop-blur: This class is equivalent to normal blur effect on element as blur(8px) in CSS.
  • backdrop-blur-md: This class is equivalent to medium blur effect on element as blur(12px) in CSS.
  • backdrop-blur-lg: This class is equivalent to large blur effect on element as blur(16px) in CSS.
  • backdrop-blur-xl: This class is equivalent to extra large blur effect on element as blur(24px) in CSS.
  • backdrop-blur-2xl: This class is equivalent to double extra large blur effect on element as blur(40px) in CSS.
  • backdrop-blur-3xl: This class is equivalent to triple extra large blur effect on element as blur(64px) in CSS.

Syntax:

<element class="filter backdrop-blur-{amount}">..</element>

Example:

HTML




<!DOCTYPE html>
<html>
<head>
    <link href=
"https://unpkg.com/tailwindcss@^2.1/dist/tailwind.min.css"
          rel="stylesheet">
</head>
  
<body class="text-center mx-4 ">
    <h1 class="text-green-600 text-5xl font-bold">
        GeeksforGeeks
    </h1>
    <b>Tailwind CSS Backdrop Blur Class</b>
    <div class=" mx-16 mt-18 h-36 relative">
        <div class="absolute w-full py-18">
            <img class="rounded-lg object-cover" 
                 src=
                 alt="image">
        </div>
        <div class="relative h-32 flex overflow-x-auto space-x-4">
            <div class="flex-shrink-0 border-4 border-green-500 
                        backdrop-filter backdrop-blur-sm w-1/3">
            </div>
            <div class="flex-shrink-0 border-4 border-green-500 
                        backdrop-filter backdrop-blur-md w-1/3">
            </div>
            <div class="flex-shrink-0 border-4 border-green-500 
                        backdrop-filter backdrop-blur-lg w-1/3">
            </div>
        </div> 
    </div>
</body>
  
</html>


Output:



Previous Article
Next Article

Similar Reads

Tailwind CSS Backdrop Brightness
The backdrop brightness class is used to apply to set the brightness of the image. This class uses the linear multiplier to the image to increase or decrease brightness. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Brightness Classes: backdrop-brightness-0: This class is used to set the brightness on an element, equivalent t
2 min read
Tailwind CSS Backdrop Filter
Tailwind CSS backdrop filter is used to enable the backdrop of any filter which is used by the filter. It works like the filter class but in opposites direction. In filter class, we have seen that, if we want to use any effect on any element like blur, contrast, brightness, etc then we have to use a filter before that effect. Similarly to disable t
1 min read
Tailwind CSS Backdrop Sepia
The backdrop sepia class is an inbuilt class that is used to apply a filter to the image to convert an image into a sepia image. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Sepia: backdrop-sepia-0: This class is used to represent the original imagebackdrop-sepia: This class is used to represent the sepia image. Syntax: &lt;
1 min read
Tailwind CSS Backdrop Invert
The backdrop invert class is an inbuilt function that is used to apply a filter to the image to set the invert of the color of the sample image. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Invert: backdrop-invert-0: This class is used to represent the original color on an element.backdrop-invert: This class is used to repre
1 min read
Tailwind CSS Backdrop Hue Rotate
The backdrop hue rotate class is an inbuilt function that is used to apply a filter to the image to set the hue rotation of the image. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Hue Rotate: -backdrop-hue-rotate-180: This class used to set the hue-rotate equivalent on an element to CSS hue-rotate(-180).-backdrop-hue-rotate-
2 min read
Tailwind CSS Backdrop Saturate
The backdrop saturate class is an inbuilt function in CSS that is used to super-saturate or desaturates the input image. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Saturate: backdrop-saturate-0: This class used to set the saturated equivalent on an element to CSS saturate(0).backdrop-saturate-50: This class used to set the
1 min read
Tailwind CSS Backdrop Grayscale
The Backdrop Grayscale class is used to apply a filter to the image to set the grayscale of the image. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Grayscale: backdrop-grayscale-0: This class is used to represents the original element.backdrop-grayscale: This class is used to represents the linear multipliers on the effect o
1 min read
Tailwind CSS Backdrop Opacity
The Backdrop Opacity class is an inbuilt function that is used to apply a filter to the image to set the transparency of the image. In CSS, we do that by using the CSS opacity() Function. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Opacity: backdrop-opacity-number: Note: Here the number is a variable that can be replaced by
1 min read
Tailwind CSS Backdrop Contrast
The Backdrop Contrast class is used to apply to set the Contrast of the image. This class can increase or decrease Contrast. Tailwind CSS newly added feature brightness in 2.1 version. Backdrop Contrast: backdrop-contrast-0: This class used to set the contrast on an element equivalent to CSS contrast(0).backdrop-contrast-50: This class used to set
2 min read
Tailwind CSS Blur
The blur class is used to apply a blurred effect filter on the image. In CSS, we do that by using the CSS blur() Function. Tailwind CSS newly added feature blur in 2.1 version. Blur: blur-0: This class is equivalent to no blur effect as blur(0) in CSS.blur-sm: This class is equivalent to small blur effect as blur(4px) in CSS.blur: This class is equ
2 min read