Kbd
Display key bindings and keyboard shortcuts with sleek typography, variants, and size scales.
import
import { Kbd } from "@/components/ui/kbd/kbd";$
npx @bloomui-react/cli add kbdkbd.tsx
Default
Standard key binding badge.
⌘K
Variants
Style variants using the variant prop: flat, bordered, or solid.
variant:
flat | bordered | solidFlat:CtrlC
Bordered:AltF4
Solid:ShiftEnter
Sizes
Scale badge dimensions using the size prop: sm, md, or lg.
size:
sm | md | lg⌘ Shift P⌘ Shift P⌘ Shift P
Keyboard Shortcuts List
Combining Kbd badges into a clean user interface reference list.
flex: anyflex-col: anygap-2: anymax-w-sm: anyborder: anyborder-zinc-200: anydark: anyborder-zinc-800: anybg-white: anybg-zinc-900: anyp-4: anyrounded-2xl: anyitems-center: anyjustify-between: anygap-1: anysize: anysm: any
Command Palette
⌘K
Copy Code
CtrlC
Quick Search
/
Key Combination Sequence Formatter
Pass an array of key names via keys to automatically render symbols like ⌘, ⇧, ⌃, ⌥, ↵, and Esc.
keys: KbdKey[]
Shortcut:⌘⇧K
Navigation:⌥↵
Cancel:Esc
Props — Kbd
Supported properties for the Kbd component.
| Prop | Type | Default | Description |
|---|---|---|---|
| keys | KbdKey[] | — | Array of key names formatted with mac/windows shortcut symbols. |
| variant | 'flat' | 'bordered' | 'solid' | 'flat' | Visual surface style variant. |
| size | 'sm' | 'md' | 'lg' | 'md' | Dimensional scale for key badge. |