Getting Started
Components
Device Mocks
Special Effects
Animations
Text Animations
Buttons
/* eslint-disable @next/next/no-img-element */
import { BlurFade } from "@/registry/magicui/blur-fade";
const images = Array.from({ length: 9 }, (_, i) => {
const isLandscape = i % 2 === 0;
const width = isLandscape ? 800 : 600;
const height = isLandscape ? 600 : 800;
return `https://picsum.photos/seed/${i + 1}/${width}/${height}`;
});
export function BlurFadeDemo() {
return (
<section id="photos">
<div className="columns-2 gap-4 sm:columns-3">
{images.map((imageUrl, idx) => (
<BlurFade key={imageUrl} delay={0.25 + idx * 0.05} inView>
<img
className="mb-4 size-full rounded-lg object-contain"
src={imageUrl}
alt={`Random stock image ${idx + 1}`}
/>
</BlurFade>
))}
</div>
</section>
);
}
Installation
pnpm dlx shadcn@latest add @magicui/blur-fade
Examples
Hello World 👋
Nice to meet you
import { BlurFade } from "@/registry/magicui/blur-fade";
export function BlurFadeTextDemo() {
return (
<section id="header">
<BlurFade delay={0.25} inView>
<h2 className="text-3xl font-bold tracking-tighter sm:text-5xl xl:text-6xl/none">
Hello World 👋
</h2>
</BlurFade>
<BlurFade delay={0.25 * 2} inView>
<span className="text-pretty text-xl tracking-tighter sm:text-3xl xl:text-4xl/none">
Nice to meet you
</span>
</BlurFade>
</section>
);
}
Usage
import { BlurFade } from "@/components/magicui/blur-fade";
<BlurFade>
<img src="https://picsum.photos/300/200?random=1" alt="Sample 1" />
<img src="https://picsum.photos/300/200?random=2" alt="Sample 2" />
<img src="https://picsum.photos/300/200?random=3" alt="Sample 3" />
</BlurFade>
Props
Prop | Type | Default | Description |
---|---|---|---|
children | React.ReactNode | - | The content to be animated |
className | string | - | The class name to be applied to the component |
variant | object | - | Custom animation variants for motion component |
duration | number | 0.4 | Duration (seconds) for the animation |
delay | number | 0 | Delay (seconds) before the animation starts |
offset | number | 6 | Offset for the animation |
direction | string | "down" | Direction for the animation (up , down , left , right ) |
inView | boolean | false | Whether to trigger animation when component is in view |
inViewMargin | MarginType | "-50px" | Margin for triggering the in-view animation |
blur | string | "6px" | Amount of blur to apply during the animation |
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