Meteors
MotionReact meteors background that sends accent colored streaks with fading tails falling diagonally behind your content, with count, angle and speed props.
Installation
npx shadcn@latest add @minidev/meteors
MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/meteors.json
Usage
import { Meteors } from "@/components/ui/meteors"
export function Example() {
return (
<Meteors />
)
}
API reference
| Prop | Type | Default |
|---|---|---|
| countHow many meteors are in flight at once. | number | 16 |
| angleDirection of travel in degrees. 0 points right, 90 falls straight down. | number | 140 |
| speedSpeed multiplier. 2 is twice as fast, 0.5 half as fast. | number | 1 |
| tailTail length in pixels. | number | 110 |
| className | string | - |
| children | React.ReactNode | - |
When to use
Use it behind a dark, quiet hero or release announcement. Reach for Particles when the backdrop should react to the pointer, and RetroGrid or Ripple for a steadier geometric backdrop.
Accessibility
- The meteor layer is
aria-hiddenandpointer-events-none. - Under reduced motion each meteor is drawn once, still and at half strength, along its path.
- Animations pause when the panel is more than 80px outside the viewport.
Frequently asked questions
Why are there no meteors in the server HTML?
Paths depend on the panel size, so they are measured with a ResizeObserver after mount. The server renders the panel and your content only, and hydration matches.
How do I change direction, density or speed?
angle sets the direction in degrees (0 points right, 90 falls straight down; default 140). count is how many are in flight (16), speed multiplies the pace and tail sets the streak length in pixels.
Dependencies
npm
Built from
Examples
Custom content
Children sit above the streaks and keep the pointer; the panel fills its container width.
Angle and speed
angle is degrees of travel, 90 is straight down; speed multiplies the pace and count adds streaks.
Sparse and slow
A handful of long, slow meteors reads as weather behind a quiet section.