Introducing Magic UI Pro - 50+ blocks and templates to build beautiful landing pages in minutes.

19.0k
173

Progressive Blur

PreviousNext

Add a progressive blur effect to scrollable content

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

PropTypeDefaultDescription
classNamestring-Additional classes to apply to the blur container.
heightstring"30%"Height of the blur effect container.
position"top" | "bottom" | "both""bottom"Position of the blur effect.
blurLevelsnumber[][0.5, 1, 2, 4, 8, 16, 32, 64]Array of blur values (in px) for progressive effect.
childrenReact.ReactNode-Optional content to render within the blur container.