Gradient Button - React Component | Kokonut UI
Gradient Button
Layered gradient button with emerald, purple and orange variants, a gradient border, a soft inner glow, press feedback and an optional icon.
Install with
Agentbunnpmpnpm
Open in
Copy code
›Add the gradient-button component from Kokonut UI to this project with npx shadcn@latest add https://kokonutui.com/r/gradient-button.json, then show me how to use it.
no extra packages
Installation
Gradient Button is a free, open-source React component in the Kokonut UI Buttons collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/gradient-button.tsx, so the code is yours to change.
Copy Text
npx shadcn@latest add @kokonutui/gradient-button
Usage
Copy Text
import GradientButton from "@/components/kokonutui/gradient-button";
export default function Example() {
return <GradientButton label="Gradient Button" />;
}
Props
children
ReactNode
Button content. Takes precedence over label.
label
string Default "Welcome"
Fallback text when no children are passed.
icon
ReactNode
Optional icon rendered before the text (e.g. a lucide-react icon).
variant
GradientButtonVariant Default "emerald"
Color theme.
Also takes every prop of Omit<ComponentProps<"button">, "children">.
GradientButtonVariant
type GradientButtonVariant = "emerald" | "purple" | "orange";
Dependencies
| Needs | Version | Comes from |
|---|---|---|
button |
shadcn/ui, added by the CLI | |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.