# Marquee

> An endless row that drifts sideways.

Logos, testimonials or keywords. Copies itself as wide as needed so there is never a gap; eases to a halt under the pointer.

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

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

<Marquee>{logos.map((l) => <Logo key={l.id} {...l} />)}</Marquee>
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `children` | `ReactNode` | — | The row. |
| `speed` | `number` | `40` | px per second. |
| `direction` | `"left" \| "right"` | `"left"` | Drift. |
| `pauseOnHover` | `boolean` | `true` | Ease to a stop on hover. |
| `fade` | `boolean` | `true` | Fade the edges. |
| `gap` | `number` | `40` | Gap in px. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Logos.** Client or partner marks.
- **Two rows.** Opposite directions.

## Accessibility

- Copies are aria-hidden; reduced motion makes it a still, scrollable row.

## Motion

- One transform per frame; pauses offscreen.
