Glin UI
Signature / Molecule

Word Rotate

Cycling text animation that rotates through an array of words.

Release 0.4

Ship interfaces that feel fast

A token-driven component library with pluggable motion, built for product teams.

Installation$

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

Prefer the package?

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.

Examples$

Fast Rotation$

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

Powered by

speed

"use client"
import { WordRotate } from "@glinui/ui"
export function WordRotateFastDemo() {
return (
<div className="flex items-center justify-center p-8">
<h2 className="text-3xl font-bold">
Powered by{" "}
<WordRotate
words={["speed", "precision", "glass", "motion"]}
duration={1500}
className="text-accent"
/>
</h2>
</div>
)
}

Engines$

Word Rotate drives its main animation through the pluggable motion engine. Pass engine="css" | "motion" | "gsap", wrap a subtree in MotionEngineProvider, or set data-glin-engine on <html>. The css engine is built in and dependency free; motion and gsap are opt-in through @glinui/motion/register/*. Motion level none renders the final state and subtle is opacity only.

Engine comparison$

CSS

fast

Motion

fast

GSAP

fast
// Same component, three engines. motion and gsap are opt-in:
// import "@glinui/motion/register/motion"
// import "@glinui/motion/register/gsap"
<WordRotate engine="css" words={["fast", "calm", "yours"]} duration={1800} />
<WordRotate engine="motion" words={["fast", "calm", "yours"]} duration={1800} />
<WordRotate engine="gsap" words={["fast", "calm", "yours"]} duration={1800} />

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)
engineEngineNameNo-Engine override: `css` (default), `motion`, `gsap` or a registered custom engine.
motionMotionLevelNo-Motion override. `none` renders the static final state, `subtle` is opacity only.
wordsstring[]Yes-Array of words to cycle through

Source$

import { 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-10-08T01:41:21.546Z · Full index: /docs/api-metadata

Primary Props Type

WordRotateProps

WordRotateProps

PropTypeRequiredDefaultDescription
animationDurationnumberNo300Animation speed for enter/exit (ms)
durationnumberNo2500Duration each word is shown (ms)
engineEngineNameNo-Engine override: `css` (default), `motion`, `gsap` or a registered custom engine.
motionMotionLevelNo-Motion override. `none` renders the static final state, `subtle` is opacity only.
wordsstring[]Yes-Array of words to cycle through