Getting Started
Components
Device Mocks
Special Effects
Animations
Text Animations
Buttons
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
"use client";
import { ScrollArea } from "@/components/ui/scroll-area";
import { ProgressiveBlur } from "@/registry/magicui/progressive-blur";
export function ProgressiveBlurDemo() {
return (
<div className="relative w-full border rounded-xl">
<ScrollArea className="relative h-[400px] overflow-hidden">
<div className="flex flex-col gap-2 p-4">
{Array.from({ length: 20 }).map((_, index) => (
<div
key={index}
className="flex h-20 w-full items-center justify-center rounded-xl bg-card border"
>
{index}
</div>
))}
</div>
<ProgressiveBlur position="bottom" height="40%" />
</ScrollArea>
</div>
);
}
Installation
pnpm dlx shadcn@latest add @magicui/progressive-blur
Usage
import { ProgressiveBlur } from "@/components/magicui/progressive-blur";
<div className="relative h-[400px] w-full overflow-auto">
{/* Your scrollable content */}
<div className="p-4 space-y-4">{/* Content items */}</div>
<ProgressiveBlur height="50%" position="bottom" />
</div>
Props
ProgressiveBlur
Prop | Type | Default | Description |
---|---|---|---|
className | string | - | Additional classes to apply to the blur container. |
height | string | "30%" | Height of the blur effect container. |
position | "top" | "bottom" | "both" | "bottom" | Position of the blur effect. |
blurLevels | number[] | [0.5, 1, 2, 4, 8, 16, 32, 64] | Array of blur values (in px) for progressive effect. |
children | React.ReactNode | - | Optional content to render within the blur container. |
Limited Time Offer
Ship Faster with Magic UI ProMagic UI Pro
Stop building from scratch.
Get 8 production-ready templates and 50+ premium components that your users will love.
✓
Next.js 15 + TypeScript ready✓
Copy, paste, customize in minutes✓
Save 100+ hours of development