Progressive Blur
A progressive blur mask at the edge of scrolling content — the closer to the edge, the blurrier — so content fades in and out smoothly.
A stacked backdrop-filter mask: several blur layers are each cut into one window, doubled layer by layer, and offset toward the edge, accumulating into a "blurrier the closer to the edge" progression. Just drop it at the edge of any relative container.
npx shadcn@latest add https://webberui.com/r/progressive-blur.jsonPlayground
Tune the props live — the code snippet updates as you go, so you can dial in the look you want before copying it.
<ProgressiveBlur />
Installation
npx shadcn@latest add https://webberui.com/r/progressive-blur.jsonOr, once registries are configured in components.json, install it as @webberui/progressive-blur.
Usage
Put ProgressiveBlur inside the relative container you want to mask and name the edge it hugs. It is a pointer-events-none purely visual overlay, so it never blocks scrolling or clicking underneath.
import { ProgressiveBlur } from "@/components/ui/progressive-blur";
<div className="relative h-80 overflow-auto">
{/* your scrolling content */}
<ProgressiveBlur side="top" size={80} />
<ProgressiveBlur side="bottom" size={80} />
</div>side can be "top", "bottom", "left", or "right", and one container can carry several edges at once.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
side | "top" | "bottom" | "left" | "right" | "bottom" | The edge the blur hugs and deepens toward |
size | number | string | 96 | Thickness of the mask along that edge (a number means px) |
layers | number | 6 | Number of stacked layers; the more layers, the smoother the gradation |
blur | number | 0.5 | Blur radius of the first layer (px), doubling with each layer after it |
tint | string | — | Fades from transparent into this color along the edge, which can carry on into the background and cover the content |
className | string | — | Forwarded to the overlay container |
How it works
- Each layer occupies a window
100 / layerswide, with adjacent windows deliberately overlapping to eliminate hard-edged banding; the blur radius doubles layer by layer, so the layer closest to the edge is the blurriest. - With
blurat0.5andlayersat6, the outermost layer blurs by about16px; raiseblurorlayersif you want it heavier. - The overlay is
pointer-events-none, so the content underneath stays scrollable and clickable. - If the browser does not support
backdrop-filter, this layer silently does nothing without affecting the content underneath; when you still need to cover the content in that case, pair it withtintto supply a gradient backing color.