Skip to content
mdxcn is now part of Shadcn Labs. details

keys

Keys

Keyboard shortcuts drawn as keycaps. Write `- ⌘K: search`, `- Ctrl+Shift+P: palette` or `- g then d: docs`. Bold the one worth learning first.

use it
Good for keyboard shortcuts, a cheat sheet, or a key combo in a tutorial.
instead
Label/value rows are Spec.

shortcuts

`keys: action`. Modifier glyphs split into their own caps. `then` starts the next chord. Bold is the one to learn first.

[ SHORTCUTS ]
⌘K
search the docs
⌘⇧C
copy the page as Markdown
Ctrl+Shift+P
command palette
g then d
go to docs
Esc
close
<Keys title="SHORTCUTS">

- **⌘K: search the docs**
- ⌘⇧C: copy the page as Markdown
- Ctrl+Shift+P: command palette
- g then d: go to docs
- Esc: close

</Keys>

install

command

[ PROPS ]
PropTypeDefaultDescription
titlestring"keys"Caption drawn on the top edge of the frame.
childrenMarkdown—A list of `keys: action`. `+` or a space joins a chord; `then` starts the next.
bindings{ keys, action, accent? }[]—Data form.
palette"mono" | "duo" | "multi""mono"mono is one accent plus muted. duo paints the second series with --graph-accent-2. multi cycles three accents.
cornerstring"+"Character at each corner of the frame.
frame"box" | "corners" | "rule" | "none""box"box draws the dashed border. corners keeps only the corner marks. rule draws dashed lines above and below. none drops the border and padding, and puts the title above the content.
classNamestring—Passed to the outer frame.