A backlight glow effect for videos, images, and SVGs.
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.
Code
import { Backlight } from "@/registry/magicui/backlight"
export default function BacklightVideoDemo() {
return (
<Backlight blur={40} className="w-full">
<iframe
className="mx-auto aspect-video w-full max-w-lg"
src="https://www.youtube.com/embed/9CJLtzzUphU"
title="Gradient Loop Background"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerPolicy="strict-origin-when-cross-origin"
allowFullScreen
></iframe>
</Backlight>
)
}






























