Command Button
kokonut-ui/command-buttonFreeComponent
Command button for shortcut.
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/command-button.jsonSource
1import { Command } from "lucide-react";2import { Button } from "@/components/ui/button";3import { cn } from "@/lib/utils";45/**6 * @author: @dorianbaffier7 * @description: Command Button8 * @version: 1.0.09 * @date: 2025-06-2610 * @license: MIT11 * @website: https://kokonutui.com12 * @github: https://github.com/kokonut-labs/kokonutui13 */1415export default function CommandButton({16 className,17 children,18 ...props19}: React.ButtonHTMLAttributes<HTMLButtonElement> & {20 children?: React.ReactNode;21}) {22 return (23 <Button24 {...props}25 className={cn(26 "relative p-2",27 "overflow-hidden rounded-lg",28 "bg-gradient-to-b from-zinc-50 to-zinc-100",29 "dark:from-zinc-800 dark:to-zinc-900",30 "border border-zinc-200 dark:border-zinc-800",31 "hover:border-zinc-300 dark:hover:border-zinc-700",32 "transition-all duration-300 ease-out",33 "group",34 "inline-flex items-center justify-center",35 "gap-2",36 className37 )}38 >39 <Command40 className={cn(41 "h-4 w-4",42 "text-zinc-600 dark:text-zinc-400",43 "transition-all duration-300",44 "group-hover:scale-110",45 "group-hover:rotate-[-4deg]",46 "group-active:scale-95"47 )}48 />49 <span className="text-sm text-zinc-600 dark:text-zinc-400">50 {children || "CMD + K"}51 </span>52 <span53 className={cn(54 "absolute inset-0",55 "bg-gradient-to-r from-indigo-500/0 via-indigo-500/10 to-indigo-500/0",56 "translate-x-[-100%]",57 "group-hover:translate-x-[100%]",58 "transition-transform duration-500",59 "ease-out"60 )}61 />62 </Button>63 );64}
What it pulls in
npm packages
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 |
