# Animated Divider

> A divider that draws itself and carries a signal.

Draws outward from the middle on arrival, with an optional label and a dot running along it now and then.

- Family: Chrome
- Plan: Creative. Included with Creative.
- Requires: React, Tailwind CSS v4 and the motion package
- Page with a live preview: https://galactrex.com/ui/animated-divider/
- 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 animated-divider
```

It installs to `components/galactrex/animated-divider.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 { AnimatedDivider } from "@/components/galactrex/animated-divider";

<AnimatedDivider label="Chapter 2" />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `label` | `ReactNode` | — | Middle label. |
| `traveler` | `boolean` | `true` | Running dot. |
| `line` | `"solid" \| "dashed" \| "dotted"` | `"solid"` | Line style. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Labelled.** A section name in the middle.

## Accessibility

- role=separator.

## Motion

- Scale from the centre, transform for the dot; pauses offscreen.
- Reduced motion: drawn.
