Kbd
octane/kbdFreeComponent
octane publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/kbd.jsonSource
1// Base UI base kbd — plain host `<kbd>` elements. Base UI ships no Keyboard primitive (the2// React Aria base renders both parts through RAC's `Keyboard`), so this matches the Radix3// base's plain-host shape.4//5// UNVERIFIED PROVENANCE: class strings taken from this package's React Aria base rather than6// transcribed from upstream's Base UI source.7import { cn } from '@/lib/utils';8import type { HostProps } from '@/lib/types';910export function Kbd({ className, ...props }: HostProps<'kbd'>) @{11 <kbd12 data-slot="kbd"13 className={cn(14 'pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm bg-muted px-1 font-sans text-xs font-medium text-muted-foreground select-none 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',15 className,16 )}17 {...props}18 />19}2021export function KbdGroup({ className, ...props }: HostProps<'kbd'>) @{22 <kbd23 data-slot="kbd-group"24 className={cn('inline-flex items-center gap-1', className)}25 {...props}26 />27}
What it pulls in
Other registry items
Files it writes
More from octane
All 44 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | octane | Components | Free | 2 deps | |
| Alertalert | octane | Components | Free | 1 dep | |
| Alert Dialogalert-dialog | octane | Components | Free | 1 dep | |
| Aspect Ratioaspect-ratio | octane | Components | Free | no deps | |
| Avataravatar | octane | Components | Free | 1 dep | |
| Badgebadge | octane | Components | Free | 1 dep | |
| Breadcrumbbreadcrumb | octane | Components | Free | 1 dep | |
| Buttonbutton | octane | Components | Free | 2 deps |
