Skip to content
Premium & Brand

Word Rotate

Cycles through a list of words with a vertical swap.

Import

tsx
import { WordRotate } from "@cronus-ui/ui";
bash
npx cronus-ui add word-rotate

Examples

API Reference

Generated from the component's exported types.

WordRotateProps

Extends Omit<HTMLAttributes<HTMLSpanElement>, "children">

Skip WordRotateProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>
words*
string[]Phrases to cycle through.
interval
number2200Milliseconds each word stays on screen.
reducedMotion
"user" | "always" | "never""user"How `prefers-reduced-motion` is honoured. Defaults to `"user"` (cross-fade becomes a cut). `"never"` always animates; `"always"` always cuts.
lockWidth
booleantrueWhen true (default), the box stays as wide as the longest word so the line does not reflow. Set false when an underline or similar chrome should track the visible word.
announce
booleantrueWhen false, skip the polite live region — use inside a heading so assistive tech is not re-announced every interval.