# Word Rotator

Sentence with one slot that cycles through a list of words by sliding, flipping or blurring them in place.

```bash
npx shadcn add https://www.reelcn.dev/r/word-rotator.json
```

Usage:

```tsx
<Center>
  <WordRotator before="Made for" words={["creators", "startups", "agencies"]} effect="slide" />
</Center>
```

Use for:

- Taglines that list audiences, platforms or benefits
- Hooks such as "Made for creators / startups / agencies"

Avoid:

- Emphasizing one fixed phrase. Use `highlight`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. Frames each word rests before the next one arrives. Defaults to 1s. `duration` sets the swap length. |
| before? | `string` | — | Text before the slot. |
| words | `string[]` | — | Words cycled through the slot. |
| after? | `string` | — | Text after the slot. |
| effect? | `WordRotatorEffect` | `"slide"` |  |
| fit? | `"word" \| "widest"` | `"widest"` | `widest`: the slot always fits the widest word, so the sentence never moves. `word`: it eases to each word's width. |
| loop? | `boolean` | `true` | Start over after the last word. `false` stops on it. |
| size? | `number` | `96` | Font size in design units. |
| weight? | `number` | — |  |
| font? | `"mono" \| "heading" \| "body"` | `"heading"` |  |
| color? | `string` | — |  |
| accentColor? | `string` | — | Color of the rotating words. Defaults to the theme accent. |
| align? | `"left" \| "right" \| "center"` | `"center"` |  |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |