Word Rotate

A vertical rotation of words

motion-sv

Word

Installation

pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/word-rotate.json

Usage

<script lang="ts">	import { WordRotate } from "#lib/components/magic/word-rotate/index.js";</script>
<WordRotate words={["Design", "Develop", "Ship"]} />

Props

Word Rotate

A component for Word Rotate.

NameTypeDefaultDescription
classClassValue""Additional CSS classes to apply
wordsstring[]requiredArray of words to rotate through
durationnumber2500Duration between word changes in milliseconds
motionPropsMotionProps{ initial: { opacity: 0, y: -50 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: 50 }, transition: { duration: 0.25, ease: 'easeOut' } }Motion animation properties