Spinning Text
- Source
- Magic UI ↗
- Author
- Magic UI
- Licence
- MIT
Loading…
A phrase laid out on a circle, rotating continuously.
Code
"use client";
import { SpinningText } from "@/lab/magicui/ui/spinning-text";
export default function SpinningTextDemo() {
return (
<div className="relative flex h-full w-full items-center justify-center text-neutral-950">
<SpinningText>learn more • earn more • grow more •</SpinningText>
</div>
);
}
Prompt
Build "Spinning Text", a text animation. What it does: A phrase laid out on a circle, rotating continuously. Write it as a single self-contained React component in TypeScript that fills its parent (w-full h-full), styled with Tailwind CSS, using motion. Technique: the Motion library. It sits on a light background, in a 16:10 frame. Respect prefers-reduced-motion with a still state, pause work when the element is off screen, and keep it accessible. Original: https://magicui.design/docs/components/spinning-text (Magic UI, MIT).