BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/basecn/kbd

Kbd

basecn/kbd
FreeComponent

Used to display textual user input from keyboard.

Live preview

live · rendered by the registry
Rendered by basecn on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://basecn.dev/r/kbd.json

Source

src/registry/components/ui/kbd.tsxbasecn.dev/r/kbd.json
1import { cn } from "@/lib/utils";
2
3function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
4 return (
5 <kbd
6 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",
9 "[&_svg:not([class*='size-'])]:size-3",
10 "[[data-slot=tooltip-content]_&]:bg-background/20 [[data-slot=tooltip-content]_&]:text-background dark:[[data-slot=tooltip-content]_&]:bg-background/10",
11 className
12 )}
13 {...props}
14 />
15 );
16}
17
18function KbdGroup({ className, ...props }: React.ComponentProps<"div">) {
19 return (
20 <kbd
21 data-slot="kbd-group"
22 className={cn("inline-flex items-center gap-1", className)}
23 {...props}
24 />
25 );
26}
27
28export { Kbd, KbdGroup };

Files it writes

  • src/registry/components/ui/kbd.tsx

Facts

Registry
basecn
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on basecn basecn.dev akash3444/basecn on GitHub Raw registry item This item as JSON

More from basecn

All 56 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionbasecnComponentsFree2 deps
AlertalertbasecnComponentsFree1 dep
Alert Dialogalert-dialogbasecnComponentsFree1 dep
Aspect Ratioaspect-ratiobasecnComponentsFreeno deps
AutocompleteautocompletebasecnComponentsFree2 deps
AvataravatarbasecnComponentsFree1 dep
BadgebadgebasecnComponentsFree2 deps
BreadcrumbbreadcrumbbasecnComponentsFree2 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex