Skip to content
VenusUI
Get started

Beam Rain

Beams of light fall to the floor and burst into sparks when they land.

Preview

Installation

npx shadcn@latest add @venusui/beam-rain

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/beam-rain.tsx

Usage

The 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>
  )
}

API reference

PropTypeDefaultDescription
countnumber8Number of beams.
colors[string, string]violet → pale cyanBeam color from tail to head, also used for sparks. Any CSS colors.

Only the props above, plus className.

Requirements

  • motion (the CLI installs it) and Tailwind CSS v4. The CLI adds the beam-rain-fall keyframes.

Customization

  • Made for dark panels. Place inside a relative isolate overflow-hidden element.

Accessibility

  • Decorative (aria-hidden).
  • Paused off screen; absent with reduced motion.

Troubleshooting

Beams fall outside the panel.
Give the parent relative overflow-hidden.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (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 found
Run npx shadcn@latest init in your project first.
Loading preview

Background Beams

Backgrounds

Curved lines across a section with light traveling along them.

Loading preview

Lamp

Effects

A glowing bar casting a cone of light that opens over the content below.

Loading preview

Meteors

Backgrounds

Streaks of light falling diagonally across a card or section.