Blur fade in and out animation. Used to smoothly fade in and out content.
Install
Add it to your project
Run this in a project set up for shadcn/ui. It writes the files and installs the npm packages.
First time: connect the Infinity UI registry
- Create a personal token on your Tokens page.
- Put it in
.env.localasINFINITYUI_TOKEN. - Add the registry to
components.json:
{
"registries": {
"@infinityui": {
"url": "https://infinityui.io/r/{name}.json",
"headers": {
"Authorization": "Bearer ${INFINITYUI_TOKEN}"
}
}
}
}Using Claude Code, Codex, Cursor, Lovable or v0? See CLI & MCP for a setup prompt.
npm packages it adds
- motion
Code
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 default 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>
)
}
































