Loading preview
Beam Rain
BackgroundsBeams of light fall to the floor and burst into sparks when they land.
Curved lines across a section with light traveling along them.
npx shadcn@latest add @venusui/background-beamsRun this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.
Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.
@/components/ui/background-beams.tsxThe code behind the preview above.
background-beams-demo.tsx
import { BackgroundBeams } from "@/components/ui/background-beams"
export default function BackgroundBeamsDemo() {
return (
<div className="dark relative isolate flex h-80 w-full items-center justify-center overflow-hidden rounded-xl border bg-background text-foreground">
<BackgroundBeams />
<div className="text-center">
<p className="text-3xl font-semibold tracking-tight">Join the waitlist</p>
<p className="mt-2 text-sm text-muted-foreground">Light travels along every beam.</p>
</div>
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| count | number | 18 | Number of beams. |
| colors | [string, string] | violet → sky | Start and end color of the traveling light. Any CSS colors. |
All <div> props, including className.
beam-travel keyframes and --animate-beam-travel.colors.relative element with isolate so it stays behind your content.aria-hidden).relative isolate to the parent; the beams sit at -z-10.Unknown registry "@venusui"npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.No components.json foundnpx shadcn@latest init in your project first.