Gradient Button
kokonut-ui/gradient-buttonFreeComponent
That was so hard to make.
Live preview
live · rendered by the registry
Rendered by kokonut-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://kokonutui.com/r/gradient-button.jsonSource
1/**2 * @author: @dorianbaffier3 * @description: Gradient Button4 * @version: 1.0.05 * @date: 2025-06-266 * @license: MIT7 * @website: https://kokonutui.com8 * @github: https://github.com/kokonut-labs/kokonutui9 */1011import { Button } from "@/components/ui/button";12import { cn } from "@/lib/utils";1314type ColorVariant = "emerald" | "purple" | "orange";1516interface GradientColors {17 dark: {18 border: string;19 overlay: string;20 accent: string;21 text: string;22 glow: string;23 textGlow: string;24 hover: string;25 };26 light: {27 border: string;28 base: string;29 overlay: string;30 accent: string;31 text: string;32 glow: string;33 hover: string;34 };35}3637interface GradientButtonProps38 extends React.ButtonHTMLAttributes<HTMLButtonElement> {39 icon?: string;40 label?: string;41 className?: string;42 variant?: ColorVariant;43}4445const gradientColors: Record<ColorVariant, GradientColors> = {46 emerald: {47 dark: {48 border: "from-[#336C4F] via-[#0C1F21] to-[#0D6437]",49 overlay: "from-[#347B52]/40 via-[#0C1F21] to-[#0D6437]/30",50 accent: "from-[#87F6B7]/10 via-[#0C1F21] to-[#17362A]/50",51 text: "from-[#8AEECA] to-[#73F8A8]",52 glow: "rgba(135,246,183,0.1)",53 textGlow: "rgba(135,246,183,0.4)",54 hover: "from-[#17362A]/20 via-[#87F6B7]/10 to-[#17362A]/20",55 },56 light: {57 border: "from-emerald-400 via-emerald-300 to-emerald-200",58 base: "from-emerald-50 via-emerald-50/80 to-emerald-50/90",59 overlay: "from-emerald-300/30 via-emerald-200/20 to-emerald-400/20",60 accent: "from-emerald-400/20 via-emerald-300/10 to-emerald-200/30",61 text: "from-emerald-700 to-emerald-600",62 glow: "rgba(52,211,153,0.2)",63 hover: "from-emerald-300/30 via-emerald-200/20 to-emerald-300/30",64 },65 },66 purple: {67 dark: {68 border: "from-[#6B46C1] via-[#0C1F21] to-[#553C9A]",69 overlay: "from-[#7E22CE]/40 via-[#0C1F21] to-[#6B46C1]/30",70 accent: "from-[#E9D8FD]/10 via-[#0C1F21] to-[#44337A]/50",71 text: "from-[#E9D8FD] to-[#D6BCFA]",72 glow: "rgba(159,122,234,0.1)",73 textGlow: "rgba(159,122,234,0.4)",74 hover: "from-[#44337A]/20 via-[#B794F4]/10 to-[#44337A]/20",75 },76 light: {77 border: "from-purple-400 via-purple-300 to-purple-200",78 base: "from-purple-50 via-purple-50/80 to-purple-50/90",79 overlay: "from-purple-300/30 via-purple-200/20 to-purple-400/20",80 accent: "from-purple-400/20 via-purple-300/10 to-purple-200/30",81// … truncated
What it pulls in
Other registry items
Files it writes
More from kokonut-ui
All 40 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Action Search Baraction-search-bar | kokonut-ui | Components | Free | 2 deps · 2 files | |
| AI Input Searchai-input-search | kokonut-ui | Components | Free | 1 dep · 2 files | |
| AI State Loadingai-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Input Selectorai-prompt | kokonut-ui | Components | Free | 2 deps · 4 files | |
| AI Text Loadingai-text-loading | kokonut-ui | Components | Free | 1 dep | |
| AI Voiceai-voice | kokonut-ui | Components | Free | 2 deps | |
| Apple Activity Cardapple-activity-card | kokonut-ui | Components | Free | 1 dep | |
| Magnet Buttonattract-button | kokonut-ui | Components | Free | 2 deps |
