Components

Meteors

An animated meteor shower background for React: a few shooting stars with fine tails streak across the container at staggered intervals. Seeded so server and client render the same sky, compositor-animated, and paused off-screen.

  • Background
  • Shooting stars
  • Seeded layout
  • Pauses off-screen
  • Reduced-motion safe

Launch week

One new feature every day, Monday to Friday.

Installation

$ npx shadcn@latest add https://duskui.com/r/meteors.json

The sky fills its nearest positioned parent, so give the parent relative and overflow-hidden, and put your content after it with relative so it sits on top.

Usage

hero.tsx
import { Meteors } from "@/components/dusk/backgrounds/meteors"

export function Hero() {
  return (
    <section className="relative overflow-hidden">
      <Meteors />
      <div className="relative">{/* your content */}</div>
    </section>
  )
}

Examples

Angle & color

angle is the direction of travel in degrees (0 is right, 90 is straight down). Paths are fitted to the container, so every meteor crosses it at any angle. tailLength sets the average tail.

angle={100}
angle={200}

Inside a card

Fewer meteors, fewer stars and a slower speed suit small surfaces like a pricing card.

Pro

$24/mo

  • Unlimited projects
  • Priority builds
  • Custom domains

API Reference

Any other div prop is passed to the root. Meteors are animated with the Web Animations API on transform and opacity only, so they run on the compositor.

PropTypeDefaultDescription
countnumber6Number of meteors.
anglenumber135Direction of travel in degrees: 0 is right, 90 is down.
colorstring"rgb(255 255 255 / 0.7)"Tail color. Any CSS color.
speednumber1Speed multiplier; also shortens the pause between passes.
tailLengthnumber100Average tail length in px.
starsnumber20Faint still stars scattered behind the meteors.
seednumber1Seed for a different, but stable, sky.
classNamestring—Merged onto the absolutely positioned root.

Accessibility

  • The sky is decorative: it is aria-hidden and pointer-events-none, so it never reaches screen readers or blocks clicks.
  • With prefers-reduced-motion a few meteors are shown frozen mid-flight instead of moving.
  • Animations pause while the sky is off-screen or the tab is hidden.
  • Meteors cross the foreground; keep text on a card or use fewer, slower meteors behind long copy.