Motionshelf
← All components

Text

Rotating Word

One sentence, one word that keeps changing.

Install

npx shadcn@latest add https://motionshelf-pi.vercel.app/r/rotating-word.json

Copies the file into your project. Requires React 19, Tailwind CSS v4 and GSAP (installed as a dependency).

Props

NameTypeDefaultDescription
prefixstring"Build your next"Text before the word that changes.
wordsstring[]["landing page", "dashboard", "checkout", "onboarding"]Words that take turns in the slot.
suffixstring"in minutes."Text after the word that changes.
accentstring"#1f5bff"Color of the changing word.
loopbooleantrueReplay forever with a pause between runs.
classNamestring""Extra classes for the outer element.

Dependencies

  • gsap
  • @gsap/react