Searching Puzzle Pieces

Type to search Puzzle Pieces.

Kbd

A keyboard-key hint rendered in the native kbd element with an inset keycap shadow. Slot content is the key or chord text; a class prop appends the caller's utilities.

⌘ K Command palette⌘ S SaveEsc Close

Installation

Copy the piece into your app — it compiles with your build and the code is yours:

puzzle add piece kbd

Requires the pieces.css tokens merged into your app styles (see Introduction).

Usage

import Kbd from '@/components/ui/Kbd.pzl';
<Kbd>⌘</Kbd>

In prose

Press ⌘ K to open the command palette, or hit Esc at any time to dismiss it.

Each key is its own piece, so chords are written as adjacent tags. Inline, they sit on the text baseline and inherit the surrounding size, so they read naturally mid-sentence.