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

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component WordRotateDefault layout:inline style:word-rotate {
  label "Design"
  text "Design"
  text "System"
}

page "/audit/word-rotate/default" type:custom {
  use WordRotateDefault
}

API Reference

Generated from the component's exported types.

WordRotateProps

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

Skip WordRotateProps props table
PropTypeDefaultDescription
ref
Ref<HTMLSpanElement>—Ref forwarded to the underlying DOM node.
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.
className
string—Additional class names merged onto the root.
id
string—DOM id of the root element.