Skip to content

Kbd

A keyboard key rendered as a <kbd>, or a shortcut rendered as a <kbd class="kbd-group"> of keys. Requires Tabler 1.7+.

The content is a single key. keys renders a shortcut instead: one Kbd:Key per key, with an even gap between them.

keys takes a string split on +, or a list. Use a list for a shortcut with the + key itself, or for keys you want to keep as they are:

Tabler spaces a key placed directly in a button or a badge, and gives it the color of its text:

Kbd:Group holds the keys of a shortcut and Kbd:Key renders one of them. A key can hold an icon, which Tabler sizes to the key:

Override the keys block to render the keys yourself, for example with a title on each:

Prop Type Default Description
keys string|list? null The keys of a shortcut: a string split on + ('ctrl+k') or a list (['⌘', 'K'])

Other attributes go to the root <kbd>.

Component Renders
Kbd:Group <kbd class="kbd-group">, around the keys
Kbd:Key <kbd>, one key of a shortcut: a label or an icon
Block Default
keys A Kbd:Key per key of keys, when set
content keys; the tag content replaces it, as a single key or to compose