0Views
0Copies
API Reference
Props for <RotatingTextBadge />
| Prop | Type | Default | Description |
|---|---|---|---|
| color | string | "#4a2a18" | The badge's fill; its soft shadow and focus ring follow it. |
| inkColor | string | "#f8e7c7" | The lettering, the icon and the inner ring. |
| Prop | Type | Default | Description |
|---|---|---|---|
| text | string | "BUY NOW" | The words that run around the edge. |
| separator | string | "•" | The mark between repeats. |
| font | FontValue | {"fontFamily":"Archivo Black","fontWeight":800} | The lettering's family and weight. The component doesn't load the font: add it to your app. |
| backTitle | string | "Today only" | The small line above the button on the reverse. |
| buttonText | string | "Buy Now" | The button on the reverse. |
| backAction | string | "Back" | The link under the button that turns the badge back over. |
| Prop | Type | Default | Description |
|---|---|---|---|
| repeat | number | 3 | How many times the text goes around; fewer repeats spread the letters wider. |
| size | number | 144 | Width and height, at most the parent's width. |
| turnSeconds | number | 18 | Seconds for the lettering to go once around; higher is slower. |
| reverse | boolean | false | Which way the lettering turns. |
| stopOnHover | boolean | true | Hovering or focusing eases the turn to a stop and lifts the badge a little. |
| flippable | boolean | true | A click flips the badge over like a coin to show the button on its reverse. |
| flipScale | number | 1.3 | How much bigger the badge grows when flipped, so its reverse is easy to read and tap. |
| Prop | Type | Default | Description |
|---|---|---|---|
| showIcon | boolean | true | The shopping bag in the middle. |
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | — | What screen readers announce for the badge; defaults to the text. |
| href | string | — | Renders the button as a link to this address; with the flip off, the badge itself becomes the link. |
Motion score
Compositor-only
- Category
- Buttons
- Framework
- React
- Published
- Nov 27, 2026
- Dependencies
- Variants
Rotating Text Badge: a rotating text animation for React
A round badge with a wavy edge, a shopping bag icon at its center and BUY NOW repeated around its rim. The ring of text turns around the icon, so the badge catches the eye without a word of extra copy.
Use Rotating Text Badge as a call to action for a shop, a sale or a sign-up, where a standard button feels too plain. It's a Free React component for Next.js, Vite and Astro with Tailwind CSS v4. More in this category.
What is Rotating Text Badge?#
Rotating Text Badge is a rotating text animation for React that wraps a short message around a circular badge. The text runs around the rim while an icon sits still in the middle, so the badge reads as one clear action.
How Rotating Text Badge works#
The phrase repeats around the edge of the badge, separated by dots, and turns around the central icon. The wavy outline and soft shadow make it feel like a sticker on the page, which draws the eye to it without crowding the layout.
Customization options#
Change the text on the rim, the center icon and the colors to match your offer. Open the Customize panel on the component page to try them in the live preview, save a look as a variant, then install it. After install, the source is yours to edit.
Use cases#
- Shop and product pages, with a BUY NOW or SHOP NOW badge next to the product.
- Sales and launches, where a turning badge highlights a limited offer.
- Portfolios and studios, with a badge such as GET IN TOUCH that links to a contact page.
FAQs#
Yes. Replace BUY NOW with your own short phrase. Short, repeated phrases work best, because they fill the ring evenly.
Yes. Swap the shopping bag for any icon that matches your action, such as a mail or arrow icon.
Yes. It works on every account, and anything you install is yours to keep.
React in Next.js, Vite and Astro, styled with Tailwind CSS v4. In a JavaScript project, the CLI converts it to
.jsx as it installs.