Components
- Accordion
- Action Bar
- Alert Dialog
- Alert
- Announcement
- Aspect Ratio
- Autocomplete
- Avatar
- Badge
- Bottom Navigation
- Breadcrumb
- Button Group
- Button
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Circular Progress
- Circular Slider
- Clipboard
- Collapsible
- Color Picker
- Combobox
- Command
- Context Menu
- Data List
- Date Picker
- Dialog
- Drawer
- Editable
- Field
- File Upload
- Float
- Floating Panel
- Frame
- Hint
- Hover Card
- Image Cropper
- Input Group
- Input OTP
- Input
- Item
- Kbd
- Link Overlay
- Listbox
- Marquee
- Menu
- Native Select
- Number Input
- Pagination
- Popover
- Progress
- Prose
- QR Code
- Radio Group
- Rating
- Resizable
- Scroll Area
- Segment Group
- Select
- Separator
- Sheet
- Sidebar
- Signature Pad
- Skeleton
- Skip Nav
- Slider
- Spinner
- Status
- Steps
- Switch
- Table
- Tabs
- Textarea
- Timer
- Toast
- Toggle Group
- Toggle Tooltip
- Toggle
- Tooltip
- Tour
- Tree View
K⌘⌃⇧
⌘+K
Installation
pnpm dlx shadcn@latest add https://shark.vini.one/r/kbd.json
Usage
import { Kbd, KbdGroup } from "@/components/ui";
<KbdGroup> <Kbd>⌘</Kbd> <Kbd>K</Kbd> </KbdGroup>
Variant
Use the variant prop to change the visual style of the kbd.
Outline
K⌘⌃
Examples
Group
Use <KbdGroup /> to group keys into a single shortcut.
Use
Ctrl+K
to open the command paletteInput Group
Use <Kbd /> inside <InputGroup /> addons to show shortcut hints next to inputs.
⌘K
Button
Add shortcut hints to buttons with <Kbd /> or <KbdGroup />.
Tooltip
Show keyboard shortcuts in <Tooltip /> content.
API Reference
Kbd
Styled representation of a single key (e.g. ⌘, Enter).
| Prop | Type | Default |
|---|---|---|
variant | default, outline | default |
className | string | - |
asChild | boolean | false |
KbdGroup
Groups multiple keys into one shortcut (e.g. ⌘ + K).
| Prop | Type | Default |
|---|---|---|
className | string | - |
asChild | boolean | false |