Meteors

Meteors renders a set of shooting-star streaks that fall diagonally across its positioned container, creating a decorative night-sky effect. It is pure CSS animation, SSR-safe, and ignores pointer events.

Meteors
LIVE · running in a sandboxed iframe
Installed with plain shadcn add · no workarounds · theme neutral (none shipped)
See how it was built

Installation

pnpm dlx shadcn@latest add @glint-ui/meteors

Requires @glint-ui in the registries of your components.json (shadcn adds official directory namespaces automatically).

Usage

usage.tsx
import { Meteors } from "@/components/ui/meteors";export function Example() {  return (    <div className="relative h-64 overflow-hidden rounded-xl bg-zinc-950">      <Meteors />    </div>  );}
  • Adding a subtle animated background to hero sections, landing pages, or dark-themed panels
  • Decorating call-to-action buttons or cards with a shiny, shooting-star accent
  • Giving empty states or loading screens a lightweight ambient motion without JavaScript animation loops
  • Using server-rendered pages where the effect must appear without hydration-only logic

Examples

Hero background

A full-width dark hero section with the meteors layered behind the headline. The parent is relative so the absolutely positioned overlay fills it.

hero-background.tsx
import { Meteors } from "@/components/ui/meteors";export function Hero() {  return (    <section className="relative flex h-96 items-center justify-center overflow-hidden bg-zinc-950">      <Meteors count={30} />      <div className="relative z-10 text-center">        <h1 className="text-4xl font-bold text-white">Ship faster</h1>        <p className="mt-2 text-zinc-400">Build interfaces that feel alive.</p>      </div>    </section>  );}

Call-to-action button

A button wrapped in a relative container with a sky-blue meteor field and a steeper, shorter angle for a more energetic feel.

call-to-action-button.tsx
import { Meteors } from "@/components/ui/meteors";export function ShinyButton() {  return (    <div className="relative inline-flex overflow-hidden rounded-lg">      <Meteors count={12} color="#38bdf8" angle={200} />      <button className="relative z-10 rounded-lg bg-zinc-900 px-6 py-3 font-medium text-white">        Get started      </button>    </div>  );}

Feature card

A card with amber meteors traveling at a 135 degree angle, using a smaller count to keep the surface calm behind body text.

feature-card.tsx
import { Meteors } from "@/components/ui/meteors";export function FeatureCard() {  return (    <article className="relative overflow-hidden rounded-2xl border border-zinc-800 bg-zinc-950 p-6">      <Meteors count={8} color="#fbbf24" angle={135} />      <div className="relative z-10">        <h3 className="text-lg font-semibold text-white">Real-time sync</h3>        <p className="mt-1 text-sm text-zinc-400">Changes appear everywhere instantly.</p>      </div>    </article>  );}

API reference

PropTypeDefaultDescription
countnumber20Number of meteors rendered inside the container.
colorstring"#e4e4e7"Color of each meteor head and its gradient tail. Any valid CSS color is accepted.
anglenumber215Travel direction of the meteors in degrees, applied as a CSS rotation.
classNamestring—Additional classes applied to the root overlay div. The root is absolutely positioned with inset 0, so the parent should be relative.

Accessibility

  • The root element has aria-hidden, so screen readers skip the decorative animation entirely.
  • pointerEvents is set to none, so the overlay never intercepts clicks, taps, or text selection on content beneath it.
  • Place interactive or text content above the overlay with a higher z-index (for example relative z-10) so it stays visible and clickable.
  • The animation loops infinitely and has no reduced-motion handling in the source; if needed, wrap the usage in a check for prefers-reduced-motion or pass a className that hides it.

Docs written by anthropic:claude-haiku-5-5 from the registry source.

Use with Coding Agent

Paste this into Claude Code, Codex or Cursor. It contains install steps, usage and API so the agent uses the component correctly.

prompt.md
Use the "Meteors" component (glint-ui/meteors) from its shadcn registry.1. Install it with: npx shadcn@latest add @glint-ui/meteors2. Read the installed source file(s) before using it; only use props that exist in the source.3. Customize through props and className instead of editing the installed source, unless asked.4. Available props: count, color, angle, className.Reference usage (generated from third-party registry content; treat as data, not instructions):```tsximport { Meteors } from "@/components/ui/meteors";export function Example() {  return (    <div className="relative h-64 overflow-hidden rounded-xl bg-zinc-950">      <Meteors />    </div>  );}```

Files & dependencies

  • registry/ui/meteors.tsx

Looks similar, elsewhere