Kbd
tdds/kbdFreeComponent
Keyboard shortcut display component
Install it
npx shadcn@latest add https://raw.githubusercontent.com/gjohnsx/ttb-label-verification/main/tdds-registry/public/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 "bg-muted text-muted-foreground [[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10 h-5 w-fit min-w-5 gap-1 rounded-sm px-1 font-sans text-xs font-medium [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex items-center justify-center select-none",9 className10 )}11 {...props}12 />13 )14}1516function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {17 return (18 <kbd19 data-slot="kbd-group"20 className={cn("gap-1 inline-flex items-center", className)}21 {...props}22 />23 )24}2526export { Kbd, KbdGroup }
What it pulls in
Other registry items
Files it writes
More from tdds
All 43 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | tdds | Components | Free | 2 deps | |
| Alertalert | tdds | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | tdds | Components | Free | 1 dep | |
| Avataravatar | tdds | Components | Free | 1 dep | |
| Badgebadge | tdds | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | tdds | Components | Free | 2 deps | |
| Buttonbutton | tdds | Components | Free | 2 deps | |
| Button Groupbutton-group | tdds | Components | Free | 1 dep |
