# Word Rotate

> Cycle words or short phrases in place with a slide, blur, or fade, and glide the width between them.

Source: https://www.honestui.com/docs/animated/word-rotate

```tsx
"use client";

import { WordRotate } from "@/registry/default/animated/word-rotate";

const WORDS = ["designers", "engineers", "product teams", "everyone"];

export function WordRotateDemo() {
  return (
    <div className="flex w-full max-w-md flex-col gap-5">
      <h3 className="text-2xl font-semibold tracking-tight text-foreground sm:text-3xl">
        Built for <WordRotate words={WORDS} className="text-muted-foreground" />
      </h3>
      <div className="grid gap-2 border-t border-border pt-4 text-sm text-muted-foreground">
        <p>
          Blur:{" "}
          <WordRotate
            variant="blur"
            interval={2000}
            words={["Syncing", "Indexing", "Ready"]}
            className="font-medium text-foreground"
          />
        </p>
        <p>
          Fade:{" "}
          <WordRotate
            variant="fade"
            interval={2800}
            pauseOnHover
            words={["3 reviewers", "12 comments", "1 approval"]}
            className="font-medium text-foreground"
          />
        </p>
      </div>
    </div>
  );
}

```

## Overview [#overview]

Word Rotate swaps one word or short phrase for the next on a timer. The outgoing word leaves as the next one arrives, and the container glides to the new word's width so the surrounding sentence moves smoothly instead of jumping. Use it in headings to show several audiences, uses, or states without listing them all.

Three transitions are available: `slide` moves words up through a clipped line, `blur` adds a soft focus pull, and `fade` crossfades in place.

## Installation [#installation]

<CliBlock commands="[&#x22;word-rotate&#x22;]" />

## Usage [#usage]

```tsx
import { WordRotate } from "@/components/animated/word-rotate"

<h2>
  Built for <WordRotate words={["designers", "engineers", "everyone"]} />
</h2>
```

Children work as well, which lets each item carry its own styling:

```tsx
<WordRotate variant="blur" pauseOnHover>
  <span>Syncing</span>
  <span>Indexing</span>
  <span className="text-emerald-600">Ready</span>
</WordRotate>
```

## Accessibility [#accessibility]

By default, screen readers receive the full list once from a visually hidden copy, and the rotating words are hidden from them, so decorative rotation stays silent. Set `announce` when each change is meaningful, such as a status, to announce the current item through a polite live region instead.

With reduced motion enabled, items crossfade quickly in place without movement or blur, and the width changes instantly. Rotation continues so the content stays available; pass `paused` to stop it.

## API Reference [#api-reference]


  ### `words`

type: `ReactNode[]`

Items to cycle through. Children are used when omitted.

  ### `as`

type: `ElementType` · default: `&#x22;span&#x22;`

Element to render.

  ### `interval`

type: `number` · default: `2400`

Milliseconds each item stays.

  ### `variant`

type: `&#x22;slide&#x22; | &#x22;blur&#x22; | &#x22;fade&#x22;` · default: `&#x22;slide&#x22;`

Transition between items.

  ### `pauseOnHover`

type: `boolean` · default: `false`

Holds the current item while the pointer is over it.

  ### `paused`

type: `boolean` · default: `false`

Stops cycling.

  ### `animateWidth`

type: `boolean` · default: `true`

Glides the width between items of different lengths.

  ### `announce`

type: `boolean` · default: `false`

Announces each new item through a polite live region.

  ### `onIndexChange`



void">
    Called when the visible item changes.

  ### `className`

type: `string`

Class for the root element.

  ### `itemClassName`

type: `string`

Class for each item.
