A blur that builds toward one edge, so content under a floating bar melts away instead of being cut off.
pnpm dlx shadcn@latest add @latheui/progressive-blurPart of Lathe Pro. Set up your project once with your license key: npx latheui init --key <key>. See Lathe Pro.
Progressive Blur is part of Lathe Pro
The preview is live and free to try. The source, the install and every assembly come with Pro: $79 once, with lifetime updates.
Also accepts native div attributes. It is absolutely positioned, so its parent needs position: relative.
| Prop | Type | Default | Description |
|---|---|---|---|
| side | "top" | "bottom" | "left" | "right" | "bottom" | Edge the blur is strongest at. |
| strength | number | 16 | Blur radius in pixels at that edge. |
| layers | number | 6 | Stacked blur layers. More is smoother and costs more to paint. |
| tint | boolean | true | Also fades toward the background color, which keeps anything on top readable. |
| className | string | — | Sets the depth, for example h-28. Defaults to 6rem. |
A scrolling area with blurred edges. Also accepts native div attributes; size it with className.
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | "vertical" | "horizontal" | "vertical" | Scroll direction, and so which edges blur. |
| size | number | 64 | Depth of each blurred edge in px, and the scroll distance over which it fades in. |
| strength | number | 12 | Blur radius in pixels at the very edge. |
| layers | number | 6 | Stacked blur layers. |
| tint | boolean | true | Also fades toward the background color. |
| label | string | — | Names the scrolling area and makes it focusable for keyboard scrolling. |
| viewportClassName | string | — | Classes for the element that scrolls, such as padding. |
<ProgressiveBlur side="top" strength={12} className="h-20" /><ProgressiveBlurScroll label="Messages" size={56} className="h-80">
{messages}
</ProgressiveBlurScroll>Over photos or video the tint can look like a haze. Turn it off and raise the strength.
<ProgressiveBlur tint={false} strength={24} layers={8} />