kbd
gr8monk3ys/kbdFreeComponent
kbd (identity-styled).
Install it
npx shadcn@latest add https://ui.lscaturchio.xyz/r/kbd.jsonSource
1import { cn } from "@/lib/utils"23function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {4 return (5 <kbd6 data-slot="kbd"7 className={cn(8 "surface-recessed pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-md px-1.5 font-mono text-xs font-medium text-muted-foreground select-none",9 "[&_svg:not([class*='size-'])]:size-3",10 "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",11 className12 )}13 {...props}14 />15 )16}1718function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {19 return (20 <kbd21 data-slot="kbd-group"22 className={cn("inline-flex items-center gap-1", className)}23 {...props}24 />25 )26}2728export { Kbd, KbdGroup }
Files it writes
More from gr8monk3ys
All 69 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | gr8monk3ys | Components | Free | 2 deps | |
| ActiveNavLinkactive-nav-link | gr8monk3ys | Components | Free | no deps · 2 files | |
| alertalert | gr8monk3ys | Components | Free | 1 dep | |
| alert-dialogalert-dialog | gr8monk3ys | Components | Free | 1 dep | |
| aspect-ratioaspect-ratio | gr8monk3ys | Components | Free | 1 dep | |
| attachmentattachment | gr8monk3ys | Components | Free | 2 deps | |
| Avataravatar | gr8monk3ys | Components | Free | 1 dep | |
| Badgebadge | gr8monk3ys | Components | Free | 1 dep |
