kbd
shadcn-solidjs/kbdFreeComponent
shadcn-solidjs publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by shadcn-solidjs on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://shadcn-solidjs.com/r/kbd.jsonSource
1import { cn } from "~/lib/utils.ts";23import { type Component, type ComponentProps, splitProps } from "solid-js";45const Kbd: Component<ComponentProps<"kbd">> = (props) => {6 const [local, others] = splitProps(props, ["class"]);7 return (8 <kbd9 data-slot="kbd"10 class={cn(11 "h-5 w-fit min-w-5 gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background dark:in-data-[slot=tooltip-content]:bg-background/10 [&_svg:not([class*='size-'])]:size-3 pointer-events-none inline-flex select-none items-center justify-center",12 local.class,13 )}14 {...others}15 />16 );17};1819const KbdGroup: Component<ComponentProps<"kbd">> = (props) => {20 const [local, others] = splitProps(props, ["class"]);21 return (22 <kbd23 data-slot="kbd-group"24 class={cn("gap-1 inline-flex items-center", local.class)}25 {...others}26 />27 );28};2930export { Kbd, KbdGroup };
More from shadcn-solidjs
All 85 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shadcn-solidjs | Components | Free | 1 dep | |
| alertalert | shadcn-solidjs | Components | Free | 2 deps | |
| alert-dialogalert-dialog | shadcn-solidjs | Components | Free | 2 deps | |
| aspect-ratioaspect-ratio | shadcn-solidjs | Components | Free | no deps | |
| attachmentattachment | shadcn-solidjs | Components | Free | 2 deps | |
| avataravatar | shadcn-solidjs | Components | Free | 1 dep | |
| badgebadge | shadcn-solidjs | Components | Free | 2 deps | |
| breadcrumbbreadcrumb | shadcn-solidjs | Components | Free | 1 dep |
