A photon beam background component with animated light trails.
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
- react
- three
Code
"use client"
import PhotonBeam from "@/registry/eldoraui/photon-beam"
export default function PhotonBeamDemo() {
return (
<div className="bg-background relative z-10 h-[500px] w-full overflow-hidden rounded-lg border">
<PhotonBeam
colorBg="#080808"
colorLine="#005f6f"
colorSignal="#00d9ff"
colorSignal2="#00ffff"
colorSignal3="#00b8d4"
lineCount={80}
spreadHeight={50}
signalCount={94}
speedGlobal={0.345}
trailLength={3}
bloomStrength={3.0}
bloomRadius={0.5}
/>
</div>
)
}




























