Top and bottom edge overlays that use stacked backdrop-filter layers to create a smooth, progressive blur effect — no color fade needed.
Made by LéoInstallation
Usage
How it works
A single <ProgressiveBlur> renders N stacked layers, each with a backdrop-filter: blur value and a CSS mask gradient. Layer 0 (closest to the edge) carries the maximum blur; each subsequent layer has a smaller blur and a wider mask band. The result is a perceptually smooth ramp from full blur at the edge to nothing at the interior.
No canvas, no SVG filters — just CSS.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
side | "top" | "bottom" | "left" | "right" | "bottom" | The edge the blur is strongest at |
strength | number | 16 | Max backdrop blur in pixels at the edge |
layers | number | 8 | Number of blur steps (more = smoother) |
size | string | number | "128px" | Thickness of the blurred area |
tint | boolean | true | Adds a background-color fade alongside the blur |
className | string | — | Extra class names on the wrapper |
The component also forwards all standard HTMLDivElement props.
Examples
Bottom only
Horizontal (left / right)
Without background tint
Set tint={false} to keep the pure blur effect without any colour overlay — useful over images or gradient backgrounds.