Core Components
Number Effects
Interactive Elements
Advanced Effects
Radix UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Base UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
⌘⇧⌥⌃Ctrl+B
import { Kbd, KbdGroup } from "@/components/ui/kbd"
export function KbdDemo() {Installation#
pnpm dlx shadcn@latest add kbd
Usage#
import { Kbd } from "@/components/ui/kbd"<Kbd>Ctrl</Kbd>Composition#
Use the following composition to build Kbd and KbdGroup:
Kbd
KbdGroup
├── Kbd
└── KbdExamples#
Group#
Use the KbdGroup component to group keyboard keys together.
Use Ctrl + BCtrl + K to open the command palette
import { Kbd, KbdGroup } from "@/components/ui/kbd"
export function KbdGroupExample() {Button#
Use the Kbd component inside a Button component to display a keyboard key inside a button.
import { Button } from "@/components/ui/button"
import { Kbd } from "@/components/ui/kbd"
Tooltip#
You can use the Kbd component inside a Tooltip component to display a tooltip with a keyboard key.
import { Button } from "@/components/ui/button"
import { ButtonGroup } from "@/components/ui/button-group"
import { Kbd, KbdGroup } from "@/components/ui/kbd"Input Group#
You can use the Kbd component inside a InputGroupAddon component to display a keyboard key inside an input group.
⌘K
import { SearchIcon } from "lucide-react"
import {RTL#
To enable RTL support in DWL Components, see the RTL configuration guide.
⌘⇧⌥⌃Ctrl+B
"use client"
import * as React from "react"API Reference#
Kbd#
Use the Kbd component to display a keyboard key.
| Prop | Type | Default |
|---|---|---|
className | string | `` |
<Kbd>Ctrl</Kbd>KbdGroup#
Use the KbdGroup component to group Kbd components together.
| Prop | Type | Default |
|---|---|---|
className | string | `` |
<KbdGroup>
<Kbd>Ctrl</Kbd>
<Kbd>B</Kbd>
</KbdGroup>Build with DWL Components
Use the copied registry, charts, blocks, and create tools in one place.
Start from the DWL Components create flow and customize from there.
Open DWL Components Create