NK

Search

Search pages, posts, and components

All components

Gradient Button

Buttons

Button with an animated conic gradient border and hover shimmer.

Installation

Add it with the shadcn CLI:

$pnpm dlx shadcn@latest add https://nawalkattel.com.np/r/gradient-button.json
Or install manually
  1. 1. Install dependencies

    pnpm add clsx tailwind-merge
  2. 2. Copy the component source into components/library/gradient-button.tsx

Props

PropTypeDefaultDescription
classNamestring - Classes applied to the button.

Accessibility

  • A real <button>, so keyboard activation and focus rings come free.
  • Focus ring is preserved despite the layered backgrounds.
  • The gradient is decoration, never the only signal of state.

Dependencies

clsxtailwind-merge