# Shooting Stars

> A quiet sky where a streak crosses now and then.

Faint fixed stars with the occasional streak, trailing light that fades from its head. Rare enough to feel like a moment.

- Family: Backgrounds
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/shooting-stars/
- Licence: https://galactrex.com/ui/license/

## Install

```sh
npx @galactrex/ui login   # once, with an API key from https://galactrex.com/account/
npx @galactrex/ui add shooting-stars
```

It installs to `components/galactrex/shooting-stars.tsx`, with the shared motion helpers beside it. First time in a project: `npx @galactrex/ui init` (setup guide: https://galactrex.com/docs/ui-components-setup/).

## Usage

```tsx
import { ShootingStars } from "@/components/galactrex/shooting-stars";

<section className="relative overflow-hidden">
  <ShootingStars />
  <h1 className="relative">Make one</h1>
</section>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `every` | `number` | `2.2` | Average seconds between streaks. |
| `angle` | `number` | `28` | Direction in degrees; 0 is left to right. |
| `length` | `number` | `140` | Trail length in px. |
| `speed` | `number` | `620` | Travel speed in px per second. |
| `stars` | `boolean` | `true` | Faint fixed stars behind. |
| `color` | `string` | `"--gxui-ink"` | CSS colour or --gxui-* name. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Night.** Streaks over fixed stars.
- **Streaks only.** `stars={false}` over your own background.

## Accessibility

- Decorative only and aria-hidden; never takes pointer events.

## Motion

- One canvas; streaks are spawned at random intervals.
- Pauses offscreen.
- Reduced motion: only the fixed stars.
