Pixelact Kbd
pixelact-ui/kbdFreeComponent
A pixel art styled keyboard key component.
Live preview
live · rendered by the registry
Rendered by Pixelact UI on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://pixelactui.com/r/kbd.jsonSource
1import { cn } from "@/lib/utils";23import "@/components/ui/pixelact-ui/styles/styles.css";45function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {6 return (7 <kbd8 data-slot="kbd"9 className={cn(10 "pixel-font",11 "bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 p-2 font-sans text-xs select-none",12 "[&_svg:not([class*='size-'])]:size-3",13 "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10",14 className15 )}16 {...props}17 />18 );19}2021function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {22 return (23 <kbd24 data-slot="kbd-group"25 className={cn("inline-flex items-center gap-1", className)}26 {...props}27 />28 );29}3031export { Kbd, KbdGroup };
Files it writes
More from Pixelact UI
All 28 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Pixelact Accordionaccordion | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alertalert | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Alert Dialogalert-dialog | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Avataravatar | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Badgebadge | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Breadcrumbbreadcrumb | Pixelact UI | Components | Free | no deps · 2 files | |
| Pixelact Buttonbutton | Pixelact UI | Components | Free | no deps · 3 files | |
| Pixelact Calendarcalendar | Pixelact UI | Components | Free | no deps · 2 files |
