Loading preview
Background Beams
BackgroundsCurved lines across a section with light traveling along them.
Beams of light fall to the floor and burst into sparks when they land.
npx shadcn@latest add @venusui/beam-rainRun 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/beam-rain.tsxThe code behind the preview above.
beam-rain-demo.tsx
import { BeamRain } from "@/components/ui/beam-rain"
export default function BeamRainDemo() {
return (
<div className="dark relative isolate flex h-80 w-full max-w-2xl items-center justify-center overflow-hidden rounded-xl border bg-background text-foreground">
<BeamRain />
<p className="text-3xl font-semibold tracking-tight">Something big is coming</p>
</div>
)
}
| Prop | Type | Default | Description |
|---|---|---|---|
| count | number | 8 | Number of beams. |
| colors | [string, string] | violet → pale cyan | Beam color from tail to head, also used for sparks. Any CSS colors. |
Only the props above, plus className.
motion (the CLI installs it) and Tailwind CSS v4. The CLI adds the beam-rain-fall keyframes.relative isolate overflow-hidden element.aria-hidden).relative overflow-hidden.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.Curved lines across a section with light traveling along them.
A glowing bar casting a cone of light that opens over the content below.
Streaks of light falling diagonally across a card or section.