# Wave Text

> Letters bob in a travelling wave.

Continuous and gentle for playful titles and loading lines, or one wave per hover for links.

- 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/wave-text/
- 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 wave-text
```

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

<WaveText text="Loading your world…" />
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `text` | `string` | — | The text. |
| `as` | `ElementType` | `"span"` | Element. |
| `mode` | `"always" \| "hover"` | `"always"` | Continuous or per hover. |
| `height` | `number` | `0.18` | Wave height in em. |
| `duration` | `number` | `1.6` | Seconds per wave. |
| `className` | `string` | — | Extra classes for the outer element. |

## Variants

- **Loading.** Loading… that waves.

## Accessibility

- Real text read once.

## Motion

- Transform per letter; pauses offscreen.
- Reduced motion: still.
