Library navigation
DismissEsc
Search⌘K
Quick searchCtrlK

Kbd

A styled keyboard key or shortcut hint.

Installation

bunx shadcn@latest add https://ui.razeev.com/r/kbd.json

Usage

tsx
import { Kbd } from "@/components/hangry-ui/components/kbd";
<Kbd>Ctrl K</Kbd>

Props

PropTypeDefaultDescription
labelstring"⌘ K"Keyboard key or shortcut text.
childrenReactNode—Custom content that replaces label.
classNamestring""Additional CSS classes on the component root.
Native propsComponentProps<"kbd">—Forwards native kbd attributes, aria-* attributes, and event handlers.

Setup notes

Use Tailwind CSS v4. Borders use the global border-border token. No rounded classes or additional packages are required. Customize content with props and styling with className.