Kbd

Data display

A key the user presses, as a small key cap: a <kbd> element. One Kbd per key, side by side for a combination (<Kbd>Ctrl</Kbd><Kbd>K</Kbd>), or the whole combination in one (<Kbd>⌘K</Kbd>). It takes an icon (<Icon> or a Lucide icon) for keys like Enter.

import { Kbd } from '@limerdev/zest';
Kbd for AI tools (llms.txt)
Use for
Keyboard shortcuts in help text, a tooltip or an empty state: "Press Ctrl K to search".
Don't
A shortcut beside a menu item: use the menu's Shortcut. Code or a value the user types: use <code>.

Examples

Shortcuts

One Kbd per key, side by side for a combination, or the combination in one.

Press Ctrl K to search.

Press ⌘K on a Mac.

Press Enter to send.

Props

Every part also takes class (merged over its defaults), ref (bindable: the element), children, and child (a snippet that renders your own element, with props to spread on it).

Kbd

No props of its own beyond the common ones.