Skip to content
VenusUI
Get started

Meteors

Streaks of light falling diagonally across a card or section.

Preview

Installation

npx shadcn@latest add @venusui/meteors

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/meteors.tsx

Usage

The code behind the preview above.

meteors-demo.tsx

import { Meteors } from "@/components/ui/meteors"

export default function MeteorsDemo() {
  return (
    <div className="relative flex h-64 w-full max-w-md items-center justify-center overflow-hidden rounded-xl border bg-card">
      <Meteors count={20} />
      <div className="relative text-center">
        <p className="text-2xl font-semibold tracking-tight">Launch week</p>
        <p className="text-sm text-muted-foreground">Something new every day.</p>
      </div>
    </div>
  )
}

API reference

PropTypeDefaultDescription
countnumber16Number of meteors.

All <div> props, including className.

Requirements

  • Tailwind CSS v4. The CLI adds the meteor keyframes and --animate-meteor to your CSS. Works in Server Components.

Customization

  • Positions and timings are pseudo-random but fixed, so server and browser render the same thing.
  • Change the streak color with the from-foreground/70 class in the file, e.g. a brand color.

Accessibility

  • Decorative: aria-hidden.
  • Hidden when the user prefers reduced motion.

Troubleshooting

Meteors appear outside the card.
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

Beam Rain

Backgrounds

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

Loading preview

Lamp

Effects

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