Skip to content
VenusUI
Get started

Rotating Words

Cycles through words with a vertical slide, pausing on hover.

Preview

Installation

npx shadcn@latest add @venusui/rotating-words

Run this in a project set up with shadcn. If you haven’t set it up yet, run npx shadcn@latest init first.

Files added to your project

Paths use the default shadcn aliases. The CLI follows the aliases in your components.json.

  • @/components/ui/rotating-words.tsx

Usage

The code behind the preview above.

rotating-words-demo.tsx

import { RotatingWords } from "@/components/ui/rotating-words"

export default function RotatingWordsDemo() {
  return (
    <p className="text-center text-3xl font-semibold tracking-tight">
      Made for <RotatingWords words={["founders", "designers", "engineers", "agencies"]} className="text-muted-foreground" />
    </p>
  )
}

API reference

PropTypeDefaultDescription
wordsstring[]—Words to cycle through. Required.
intervalnumber2500Milliseconds each word stays visible.
classNamestring—Classes for the wrapper, e.g. a color.

Only the props above.

Requirements

  • The motion package. The CLI installs it.
  • React 19 and Tailwind CSS v4.

Customization

  • Pick words of similar length, so the sentence around them doesn’t shift.
  • Use it inside a heading: <h1>Made for <RotatingWords words={…} /></h1>.

Accessibility

  • Screen readers hear the full list once; the sliding word is aria-hidden.
  • Rotation pauses while hovered, and is replaced by the first word when the user prefers reduced motion.

Troubleshooting

The baseline jumps.
The wrapper is inline-flex aligned to the text bottom. If your font sits differently, adjust align-bottom on the wrapper.
Unknown registry "@venusui"
Your shadcn CLI couldn’t find the namespace in the shadcn registry index. Use the latest CLI (npx shadcn@latest), install by URL, or register it with its address: npx shadcn@latest registry add @venusui=https://venusui.com/r/{name}.json.
No components.json found
Run npx shadcn@latest init in your project first.
Loading preview

Blur Text

Text animations

Text whose words rise out of a blur one after another.

Loading preview

Gradient Text

Text animations

Text filled with a slowly moving gradient: a subtle sheen by default, or your own colors.

Loading preview

Number Ticker

Text animations

Counts up to a number when it scrolls into view, with locale-aware formatting.