StealThis .dev

Meteors

Animated shooting stars and meteors falling diagonally across the screen with glowing trails, random positions, and staggered animation delays.

Open in Lab
css javascript vue svelte
Targets: TS JS HTML React Vue Svelte

Code

Meteors

Enchanting shooting stars that streak diagonally across the screen, each with a glowing trail that fades into the darkness. Perfect for space-themed or dramatic dark backgrounds.

How it works

  1. JavaScript generates meteor elements with randomized positions and delays
  2. Each meteor is a thin rotated line with a CSS gradient trail
  3. @keyframes animate position from top-right to bottom-left with opacity fade
  4. Random animation durations and delays create natural, non-repetitive patterns
  5. Meteors loop infinitely with varying intervals

Customization

  • count prop controls meteor density
  • Change trail length via the --meteor-length variable
  • Adjust angle with --meteor-angle (default 215deg diagonal)
  • Modify colors for warm, cool, or rainbow meteor showers
  • Control speed range via JS constants

When to use it

  • Space / astronomy themed pages
  • Dark hero section backgrounds
  • Night sky / dreamy aesthetics
  • Loading screens or wait states