kbd
a small keycap for a keyboard shortcut. quiet stock and a thin edge hold 11 px mono words.
bunx --bun shadcn@latest add @mk/kbdexample
edit a synthetic orbit run name, then press ctrl enter in the form to save it. the save button performs the same action.
parts
a keycap is 20 px high and at least 20 px wide. a group leaves 4 px between the individual keys. keycaps describe a shortcut and do not take focus.
esc
single key
20 px high, 11 px mono
ctrlenter
group
4 px between keycaps
esc
single key
20 px high, 11 px mono
ctrlenter
group
4 px between keycaps
context
inside a tooltip the keycaps invert with opaque role inks. the tooltip is held open here so both modes show the keycap on its actual surface.