Skip to content

NewMCP server for your coding agent. Set it up ›

Nexus UI
Get Pro

Meteor Effect, animated React component

A canvas layer of meteors that burn in, pick up speed and leave tapering trails across whatever sits behind it. The pointer bends passing meteors toward it, and a click calls one down to strike that spot in a ring of sparks.

  • Free
  • Background Effects
  • Hover

Like Meteor Effect? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Meteor Effect stays free.

Play with it

Move the controls and watch it change. Copy code gives you a snippet with only the props you changed.

Props

PropTypeDefaultWhat it does
number18Base number of meteors in the air, before intensity scales it.
className—Classes for the root. Use "absolute inset-0" to lay it behind content.
meteorClassName—Classes for the canvas the meteors are drawn on.
minDelay0.12Shortest wait before a meteor reappears, in seconds.
maxDelay2.4Longest wait before a meteor reappears, in seconds.
minDuration3.2Fastest crossing, in seconds.
maxDuration7.2Slowest crossing, in seconds.
angle215Direction of travel in degrees, counter-clockwise from pointing right. 215 heads down and to the left.
glowtrueBloom round the heads and the impact flash.
color"#cfe6ff"Meteor colour. Any CSS colour, including CSS variables.
intensity"medium"Density preset that scales number.
hoverOnlyfalseOnly spawn meteors while the pointer is over the container.
interactivetruePointer gravity bends passing meteors; a click calls one down.
stars0Faint twinkling background stars drawn behind the meteors.
autoplayfalseCalls meteors down on a few spots until someone clicks.
children—Content drawn above the sky.

Add it to your project

  1. 1

    Set up your project once

    You need a Next.js project with Tailwind CSS and the @/ import alias. In its root folder, run this once. It creates components.json and the cn() helper in src/lib/utils.ts:

    npx shadcn@latest init -d

    Starting from nothing? The Quick Start walks through the whole thing.

  2. 2

    Connect the registry

    Run this once per project. It writes the Nexus UI entry into components.json for you:

    npx shadcn@latest registry add "@nexus-labs=https://www.nexus-ui.com/api/registry/{name}"

    Type it exactly as shown. {name} is filled in by the CLI with the component you ask for, so you never replace it.

  1. 3

    Add the component

    Run this from your project root. It adds the component, the helpers it imports and its npm packages.

    npx shadcn@latest add @nexus-labs/meteors
  2. 4

    Check what was added

    With a project made as in the Quick Start (a src/ folder), these files land in it:

    components/
    meteors/
    index.ts
    meteors.tsx
  3. 5

    Copying by hand? Skip the registry

    Instead of steps 2 and 3 you can copy the files yourself, with no registry and no API key. Step 1 still applies, so that cn() exists. Install the packages:

    npm install framer-motion

    Then show the source and create each file at the path it gives:

  4. 6

    Use it in a page

    Installing only adds the files. Import the component in a page and render it. The Usage tab on the preview shows a fuller example with props:

    // src/app/page.tsx
    import { Meteors } from "@/components/meteors";
    
    export default function Page() {
      return (
        <main>
          <Meteors />
        </main>
      );
    }

Like Meteor Effect? 256 more are in Pro.

Pro unlocks all 256 Pro components, every template and block, and everything we release next. Meteor Effect stays free.

About Meteor Effect

The Meteor Effect renders a shower of diagonal streaking particles behind page content using CSS animation. Each meteor is a gradient line that falls at a random angle, opacity, size, and speed. The combined effect creates atmospheric depth and a sense of motion while running entirely on CSS keyframes with zero JavaScript animation overhead. Use it as a hero backdrop, CTA section atmosphere, or full-page background for launch pages and AI products.

Good for

  • Hero section background effects
  • Product launch page atmospherics
  • CTA section backdrop effects
  • AI and space-themed product backgrounds

Meteor Effect questions

How do I install the Meteor Effect?

Run `npx shadcn@latest add @nexus-labs/meteors`. It adds the Meteors component to your project and installs framer-motion, its only animation dependency.

How do I change how many meteors appear and which way they fall?

Use `number` (default 18) together with `intensity` ("low", "medium" or "high", which scale the count to 0.65x, 1x or 1.45x, capped at 72). `angle` sets the travel direction in degrees (default 215), and `minDuration`/`maxDuration` and `minDelay`/`maxDelay` control speed and spacing.

Can the meteors only animate on hover?

Yes. Set `hoverOnly` and the meteors only show while the pointer is over the container. Anything you pass as `children` renders above the meteor layer, so you can wrap a card or hero with it.

Does it respect reduced motion?

Yes. When the user has prefers-reduced-motion turned on, the meteors stay in place as faint static streaks instead of moving.

Guides