Filters

Backdrop Blur v1.1.0

Utilities for sets filter backdrop blur effect to an element.


Class

classcss
backdrop-filter {blur}backdrop-filter: brightness(var(--brightness)) contrast(var(--contrast)) saturate(var(--saturate)) blur(var(--blur))
Note: Your browser does not currently support the utilities.
classcss
blur-0--blur: 0px
blur-1--blur: 2px
blur-2--blur: 4px
blur-3--blur: 6px
blur-4--blur: 8px
blur-5--blur: 10px
blur-6--blur: 12px
blur-7--blur: 14px
blur-8--blur: 16px
blur-9--blur: 18px
blur-10--blur: 20px

Usage

Filter: OFFFilter: ON

Apply the backdrop-filter class first, and then set the filter in any order when with other filters.

<!-- Example -->
<y style="background-image:url(...)">
<y class="backdrop-filter blur-2 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>

<y class="relative ...">
<img src="...">
<y class="absolute top-0 left-0">
<y class="backdrop-filter blur-2 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>
</y>

Mix with other filters, such as Backdrop Brightness, Backdrop Contrast, and Backdrop Saturate.

<!-- Example -->
<y style="background-image:url(...)">
<y class="backdrop-filter blur-2 brightness-1 contrast-1 saturate-1 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>

<y class="relative ...">
<img src="...">
<y class="absolute top-0 left-0">
<y class="backdrop-filter blur-2 brightness-1 contrast-1 saturate-1 ... bg-gray-100 bg-opacity-50">
...
</y>
</y>
</y>

Customize More

// @file: `src/_plugins.scss`
@include plugin(
(
utility: 'backdrop.blur',
//variant: 'responsive',
property: 'filter',
modifier: (
'blur-11': '...px',
'blur-12': '...px'
...
)
)
)

Variant

VariantEnabledResponsive
DefaultYes
Dark Theme
hover
group-hover
focus
focus-within
active
visited
checked
disabled