Search

Search components and flows across the catalog

ThatDesignUIOriginalInteractive preview

Rotating border button

A dark pill framed by a rainbow conic-gradient border that orbits around it, faster on hover and focus.

Category
Buttons
Platform
Responsive

Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.Default state

Use this component

Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.

FreeReact 18+Tailwind v3.4 or v4No extra packages

1. Add it with the shadcn CLI

npx shadcn@latest add https://www.thatdesignui.com/r/gradient-border-button.json

2. Use it

Every prop is optional
app/page.tsx
import GradientBorderButton from "@/components/gradient-border-button";

export default function Page() {
  return <GradientBorderButton />;
}

Prefer to paste it yourself? Open the .

Under the hood

How it’s built

What’s inside

  1. A 56px near-black pill with white text and a small sparkle icon, inside a 2px frame cut from a large rotating conic gradient (pink, violet, blue, green, amber).
  2. The gradient completes a turn every 3.2 seconds, and every 1.4 seconds while hovered or focused.
  3. Hover lightens the inner fill slightly.

How it behaves

  • The border is visible all the way round at every angle of the rotation.
  • Hover and focus speed up the rotation; focus also underlines the label.
  • The border stays still under reduced motion.
  • Disabled shows a flat grey frame.

More from ThatDesignUI

Image gallery lightbox

Image gallery lightbox

ThatDesignUIOriginalMedia component

Notification center

Notification center

ThatDesignUIOriginalNotifications component

Interactive chart card

Interactive chart card

ThatDesignUIOriginalDashboard component

Multi-select combobox

Multi-select combobox

ThatDesignUIOriginalForms component