# Orbit Loader

> A compact loader made of nested orbit rings; each spins at a different speed and starting phase so the dots never align.

Source: https://nyxui.com/components/orbit-loader

---
<ComponentPreview name="orbit-loader-demo" />

Orbit Loader is a small React loader that stacks 1–4 concentric rings, each with a single dot travelling around it. Alternating rotation directions and staggered speeds mean the dots never synchronise, so the motion stays visually interesting even at long dwell times. Pure CSS — zero JS runtime — and it honours `prefers-reduced-motion`.

## Installation

<Tabs defaultValue="cli">

<TabsList>
  <TabsTrigger value="cli">CLI</TabsTrigger>
  <TabsTrigger value="manual">Manual</TabsTrigger>
</TabsList>

<TabsContent value="cli">

```bash
npx shadcn@latest add "https://nyxui.com/r/orbit-loader.json"
```

</TabsContent>

<TabsContent value="manual">

<Steps>

<Step>Copy and paste the following code into your project.</Step>

<ComponentSource name="orbit-loader" />

<Step>Update the import paths to match your project setup.</Step>

</Steps>

</TabsContent>

</Tabs>

## Usage

```tsx
import { OrbitLoader } from "@/components/ui/orbit-loader";

export function Example() {
  return <OrbitLoader />;
}
```

### Tinted and larger

```tsx
<OrbitLoader size={72} rings={4} speed={1.6} className="text-brand" />
```

## Props

| Prop        | Type      | Default           | Description                                                             |
| ----------- | --------- | ----------------- | ----------------------------------------------------------------------- |
| `size`      | `number`  | `48`              | Overall diameter in pixels.                                             |
| `color`     | `string`  | `currentColor`    | Colour for the orbiting dots.                                           |
| `ringColor` | `string`  | muted border tone | Colour for the ring strokes.                                            |
| `showRings` | `boolean` | `true`            | Show the orbit ring strokes.                                            |
| `speed`     | `number`  | `1.2`             | Base rotation period in seconds (inner ring).                           |
| `rings`     | `number`  | `3`               | Number of orbiting rings. 1–4.                                          |
| `tail`      | `number`  | `120`             | Arc length of the comet tail behind each dot, in degrees. `0` hides it. |
| `label`     | `string`  | `"Loading"`       | Accessible label.                                                       |
| `className` | `string`  | —                 | Extra classes applied to the root `<span>`.                             |