Kbd
pure-ui/kbdFreeComponent
A customizable kbd component
Install it
npx shadcn@latest add https://raw.githubusercontent.com/MusKRI/pure-ui/main/public/r/kbd.jsonSource
1import { cn } from "@/lib/classes";23function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {4 return (5 <kbd6 data-slot="kbd"7 className={cn(8 "bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none border border-accent border-b-2",9 "[&_svg:not([class*='size-'])]:size-3",10 "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-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 };
What it pulls in
npm packages
Other registry items
Files it writes
More from Pure UI
All 291 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Pure UI | Components | Free | 4 deps | |
| Avataravatar | Pure UI | Components | Free | 3 deps | |
| Badgebadge | Pure UI | Components | Free | 4 deps | |
| Buttonbutton | Pure UI | Components | Free | 4 deps | |
| Button Groupbutton-group | Pure UI | Components | Free | 4 deps | |
| Calendarcalendar | Pure UI | Components | Free | 4 deps | |
| Cardcard | Pure UI | Components | Free | 2 deps | |
| Checkboxcheckbox | Pure UI | Components | Free | 4 deps |
