Components / Text
Circular Text
Text spinning around a circle, the classic rotating badge.
👋
Installation
Requires React 18+ and Tailwind CSS.
- 1
Install dependencies
$ npm install motion - 2
Add the component
Copy the code from the Code tab above into
components/ui/circular-text.tsx. - 3
Use it
example.tsximport { CircularText } from "@/components/ui/circular-text"; export default function CircularTextDemo() { return ( <CircularText text="Available for work • Open to collabs • "> <span className="grid size-14 place-items-center rounded-full bg-gradient-to-br from-orange-400 to-rose-500 text-2xl shadow-lg shadow-rose-500/30"> 👋 </span> </CircularText> ); }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | — | Text around the circle. End with a separator like " • ". |
| duration | number | 14 | Seconds per rotation. |
| reverse | boolean | false | Spin the other way. |
| children | ReactNode | — | Content in the middle. |
| className | string | "size-32 …" | Size and text color. |