Word Rotate

Signature / Moleculestable

Word Rotate

Cycling text animation that rotates through an array of words.

@glinui/uiComponent: word-rotate

Installation$

pnpm add @glinui/ui @glinui/tokens

Registry$

pnpm dlx @glinui/cli@latest add word-rotate

Usage$

WordRotate is a "use client" component. Place it inline inside headings or body copy to cycle through a list of words with a slide-up/slide-down transition. Each word is shown for duration milliseconds before animating to the next.

Basic$

Build with

React

TSX
1"use client"
2import { WordRotate } from "@glinui/ui"
3
4export function WordRotateDemo() {
5return (
6 <div className="flex items-center justify-center p-8">
7 <h2 className="text-3xl font-bold">
8 Build with{" "}
9 <WordRotate
10 words={["React", "Next.js", "Tailwind", "Glin UI"]}
11 className="text-accent"
12 />
13 </h2>
14 </div>
15)
16}

Examples$

Fast Rotation$

Lower duration for a rapid, high-energy cycling effect.

Powered by

speed

TSX
1"use client"
2import { WordRotate } from "@glinui/ui"
3
4export function WordRotateFastDemo() {
5return (
6 <div className="flex items-center justify-center p-8">
7 <h2 className="text-3xl font-bold">
8 Powered by{" "}
9 <WordRotate
10 words={["speed", "precision", "glass", "motion"]}
11 duration={1500}
12 className="text-accent"
13 />
14 </h2>
15 </div>
16)
17}

Accessibility$

  • The component renders with aria-live="polite" so screen readers announce each new word as it appears.
  • The outgoing word is removed from the DOM after its exit animation, preventing duplicate announcements.
  • Surrounding static text is not affected by the live region and is read normally.

Reduced Motion$

When prefers-reduced-motion: reduce is active, word cycling stops and the first word in the words array is displayed statically without any animation.

API Reference$

PropTypeRequiredDefaultDescription
animationDurationnumberNo300Animation speed for enter/exit (ms)
durationnumberNo2500Duration each word is shown (ms)
wordsstring[]Yes-Array of words to cycle through

Source$

TSX
1import { WordRotate } from "@glinui/ui"
packages/ui/src/components/word-rotate.tsx

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/word-rotate.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-02-19T17:59:28.468Z · Full index: /docs/api-metadata

Primary Props Type

WordRotateProps

WordRotateProps

PropTypeRequiredDefaultDescription
animationDurationnumberNo300Animation speed for enter/exit (ms)
durationnumberNo2500Duration each word is shown (ms)
wordsstring[]Yes-Array of words to cycle through