Skip to content
Magic UI SolidMagicUI Solid

Spinning Text

The Spinning Text component animates text in a circular motion with customizable speed, direction, color, and transitions for dynamic and engaging effects.

learn more • earn more • grow more •
@/demos/SpinningTextDemo.tsx
import { SpinningText } from '@/registry/magicui/spinning-text'
export function SpinningTextDemo() {
return <SpinningText>learn more • earn more • grow more •</SpinningText>
}
Terminal window
pnpm dlx shadcn@latest add @magicui-solid/spinning-text
learn more • earn more • grow more •
@/demos/SpinningTextDemo2.tsx
import { SpinningText } from '@/registry/magicui/spinning-text'
export function SpinningTextDemo2() {
return (
<SpinningText reverse class="text-4xl" duration={4} radius={6}>
learn more • earn more • grow more •
</SpinningText>
)
}
import { SpinningText } from '@/components/magicui/spinning-text'
<SpinningText>learn more • earn more • grow more •</SpinningText>
Prop Type Default Description
children string string[] The text content to be animated in a circular motion.
style CSSProperties {} Custom styles for the text container.
duration number 10 The duration of the full circular rotation animation.
class string A custom class name for the text container.
reverse boolean false Determines if the animation should rotate in reverse.
radius number 5 The radius of the circular path for the text animation.
transition Transition Custom transition effects for the animation.
variants { container?: Variants; item?: Variants; } Variants for container and item animations.

Original:

magicui.design/docs/components/spinning-text