backdrop-blur

Class Description

backdrop-blur

Sets backdrop-blur via --backdrop-blur. Blurs content behind the element.

CSS Rules

.backdrop-blur {
  backdrop-filter: blur(var(--backdrop-blur));
}

Usage

The .backdrop-blur class is flagged as a value-driven selector. The variable --backdrop-blur is required.
<element class="backdrop-blur" style="--backdrop-blur: /* value */;" />

Responsive

Prefix .backdrop-blur utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur" style="--md-backdrop-blur: /* value */;" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur:hover" style="--backdrop-blur-hover: /* value */;" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur::before" style="--backdrop-blur-before: /* value */;" />

<element class="content-after backdrop-blur::after" style="--backdrop-blur-after: /* value */;" />

Shorthand

Value-driven classes support a shorthand syntax like bg=pink or p=4. The runtime processes this for you. Unlike :hover that is generating CSS on the fly, shorthand only splits it and appends the corresponding style.

<!-- Input -->
<element class="backdrop-blur=value" />

<!-- Output -->
<element class="backdrop-blur" style="--backdrop-blur: value;" />

CLS Alert

This feature may cause CLS (Cumulative Layout Shift). Make sure to include a z-not-ready class in your <head> tag.

.backdrop-blur Sets backdrop-blur via --backdrop-blur. Blurs content behind the element.

backdrop-blur-xs

Applies a small backdrop blur using the xs scale token, blurring content behind the element.

CSS Rules

.backdrop-blur-xs {
  --tw-backdrop-blur: blur(var(--blur-xs));
  backdrop-filter: blur(var(--blur-xs));
}

Usage

<element class="backdrop-blur-xs" />

Responsive

Prefix .backdrop-blur-xs utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-xs" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-xs:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-xs:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-xs::before" />

<element class="content-after backdrop-blur-xs::after" />
.backdrop-blur-xs Applies a small backdrop blur using the xs scale token, blurring content behind the element.

backdrop-blur-sm

Applies a small backdrop blur preset.

CSS Rules

.backdrop-blur-sm {
  --tw-backdrop-blur: blur(var(--blur-sm));
  backdrop-filter: blur(var(--blur-sm));
}

Usage

<element class="backdrop-blur-sm" />

Responsive

Prefix .backdrop-blur-sm utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-sm" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-sm:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-sm:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-sm::before" />

<element class="content-after backdrop-blur-sm::after" />
.backdrop-blur-sm Applies a small backdrop blur preset.

backdrop-blur-md

Applies a medium backdrop blur preset. Good for frosted glass effects.

CSS Rules

.backdrop-blur-md {
  --tw-backdrop-blur: blur(var(--blur-md));
  backdrop-filter: blur(var(--blur-md));
}

Usage

<element class="backdrop-blur-md" />

Responsive

Prefix .backdrop-blur-md utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-md" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-md:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-md:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-md::before" />

<element class="content-after backdrop-blur-md::after" />
.backdrop-blur-md Applies a medium backdrop blur preset. Good for frosted glass effects.

backdrop-blur-lg

Applies a large backdrop blur preset.

CSS Rules

.backdrop-blur-lg {
  --tw-backdrop-blur: blur(var(--blur-lg));
  backdrop-filter: blur(var(--blur-lg));
}

Usage

<element class="backdrop-blur-lg" />

Responsive

Prefix .backdrop-blur-lg utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-lg" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-lg:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-lg:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-lg::before" />

<element class="content-after backdrop-blur-lg::after" />
.backdrop-blur-lg Applies a large backdrop blur preset.

backdrop-blur-xl

Applies a large backdrop blur using the xl scale token, blurring content behind the element.

CSS Rules

.backdrop-blur-xl {
  --tw-backdrop-blur: blur(var(--blur-xl));
  backdrop-filter: blur(var(--blur-xl));
}

Usage

<element class="backdrop-blur-xl" />

Responsive

Prefix .backdrop-blur-xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-xl::before" />

<element class="content-after backdrop-blur-xl::after" />
.backdrop-blur-xl Applies a large backdrop blur using the xl scale token, blurring content behind the element.

backdrop-blur-2xl

Applies a larger backdrop blur using the 2xl scale token, blurring content behind the element.

CSS Rules

.backdrop-blur-2xl {
  --tw-backdrop-blur: blur(var(--blur-2xl));
  backdrop-filter: blur(var(--blur-2xl));
}

Usage

<element class="backdrop-blur-2xl" />

Responsive

Prefix .backdrop-blur-2xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-2xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-2xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-2xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-2xl::before" />

<element class="content-after backdrop-blur-2xl::after" />
.backdrop-blur-2xl Applies a larger backdrop blur using the 2xl scale token, blurring content behind the element.

backdrop-blur-3xl

Applies the largest backdrop blur using the 3xl scale token, blurring content behind the element.

CSS Rules

.backdrop-blur-3xl {
  --tw-backdrop-blur: blur(var(--blur-3xl));
  backdrop-filter: blur(var(--blur-3xl));
}

Usage

<element class="backdrop-blur-3xl" />

Responsive

Prefix .backdrop-blur-3xl utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-3xl" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-3xl:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-3xl:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-3xl::before" />

<element class="content-after backdrop-blur-3xl::after" />
.backdrop-blur-3xl Applies the largest backdrop blur using the 3xl scale token, blurring content behind the element.

backdrop-blur-none

Removes backdrop blur by setting the backdrop blur function to 0.

CSS Rules

.backdrop-blur-none {
  --tw-backdrop-blur: blur(0);
  backdrop-filter: blur(0);
}

Usage

<element class="backdrop-blur-none" />

Responsive

Prefix .backdrop-blur-none utility with a breakpoint variant (e.g., md:) to apply styles at specific screen sizes (Supported breakpoints are xm through 2xl).

<element class="md:backdrop-blur-none" />

States

States are generated dynamically at runtime and always come last. Append a state like :hover or :focus to the end of the class. This works in conjunction with breakpoints .

Supported pseudo-classes: :hover, :active, :focus, :focus-visible, :focus-within, :target, :checked, :disabled, and :group-hover.

<element class="backdrop-blur-none:hover" />

Group Hover Example

The :group-hover state applies styles when a parent element with the .group class is hovered.

<element class="group">
  <element class="backdrop-blur-none:group-hover">...</element>
</element>

Pseudo-Elements

The ::before and ::after utility classes are supported too. Granted that you add the mandatory content-before or content-after class in order for them to work.

<element class="content-before backdrop-blur-none::before" />

<element class="content-after backdrop-blur-none::after" />
.backdrop-blur-none Removes backdrop blur by setting the backdrop blur function to 0.