1
3
Block

Word Rotate

PreviousNext

Component for a group of words that rotate.

import { WordRotate } from "@/components/ui/word-rotate"

export function WordRotateDemo() {
  return (
    <WordRotate
      className="text-4xl font-bold text-black dark:text-white"
      words={["Website", "Platform", "Builder", "Experience"]}
      duration={2000}
      pauseOnHover
    />
  )
}

Installation

pnpm dlx shadcn@latest add https://ebonui.com/r/word-rotate.json

Usage

import { WordRotate } from "@/components/ui/word-rotate"
<WordRotate words={["Website", "Platform", "Builder", "Experience"]} />

Props

PropTypeDefaultDescription
classNamestring-The class name to be applied to the component
durationnumber2500Duration of the animation
wordsstring[]""An array of words to rotate through
motionPropsHTMLMotionProps{}An object containing motion animation props