Progressive blur preview

Progressive blur

A blur that eases in towards one edge of its parent, with no hard line: the soft frosted fade under headers, toolbars, image captions and scroll edges. Stacked backdrop-filter layers, optional tint, no JavaScript at runtime.

  • Group
    Effects
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 26
npx shadcn@latest add @deank/progressive-blur

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { ProgressiveBlur } from "@/registry/components/progressive-blur/progressive-blur";

<ProgressiveBlur />

Props

PropTypeDefaultDescription
side?ProgressiveBlurSide"bottom"Edge where the blur is strongest. It fades to nothing towards the opposite edge.
size?string"33%"Depth of the blurred band, any CSS length. "100%" covers the whole parent.
blur?number16Strongest blur at the edge, in px.
layers?number6How many stacked layers. More is smoother and costs more to paint; 5 to 8 reads well.
tint?stringColour that fades in with the blur, such as "var(--background)", so text over busy images stays readable.
tintStrength?number0.6How strong the tint gets at the edge, 0 to 1.
position?"absolute" | "fixed""absolute"Positioning of the band. absolute sits on the nearest positioned parent; fixed sits on the viewport edge.

Also accepts every prop of Omit<HTMLAttributes<HTMLDivElement>, "children">.

When to use

A sticky header, toolbar or tab bar over scrolling content; captions and controls laid over photos or video; the fade at the end of a scroll area or carousel; the bottom of a hero image where the next section starts.

When not to use

Dimming a whole page behind a dialog (use the dialog's overlay); a uniform frosted panel (liquid-glass-card); large full-screen areas on low-end devices, since every layer is a backdrop-filter.

Related

Liquid glass card · Aurora background · Grid background · Sheet / drawer