Skip to content
Ballpoint

Kbd

A keycap sketched as a small box with a heavier bottom edge.

From shadcn/ui
⌘K

Press Ctrl+Shift+P to open the command palette.

Installation

pnpm dlx shadcn@latest add @ballpoint/kbd

Usage

tsx
import { Kbd, KbdGroup } from "@/components/ui/kbd"

<KbdGroup>
  <Kbd>⌘</Kbd>
  <Kbd>K</Kbd>
</KbdGroup>

Examples

Shortcut list

Each action with the keys that trigger it.

Search the docs
/
Open the command palette
CtrlK
Close a dialog
Esc
Move between tabs
←→

In a button

A hint inside a button for its shortcut.

API reference

children
ReactNode

The key: a letter, a word, or an icon.

KbdGroup
component

Sets keys pressed together side by side, in the hand.

seed
string | number

Pins the drawing.

Pen settings

The drawing also takes draw, roughness, radius, weight and speed, as props or from the nearest InkProvider. What each one does.