Skip to content

Kbd

A keyboard shortcut drawn as a key cap.

Group: Text · Kind: macro · in the lite catalog

example
⌘K

Open in the playground

The same specimen painted by React, SwiftUI, Compose and gpui.

exponential-ui-kbd on Web
exponential-ui-kbd on iOS
exponential-ui-kbd on Android
exponential-ui-kbd on Desktop
Prop Type Required Bindable Description
keys string yes – The shortcut text (⌘K, Ctrl+Shift+P).

None.

None.

none

No basic catalog component maps here.

Box · Text

Role: text

text (the shortcut spelled out)

Not focusable; no keys.

Recipe parts: Kbd/root Kbd/label

Keyed by: :hover :pressed :focus :disabled :checked :open :selected :invalid :dragover

Themes · Write a theme

Text · Heading · Markdown · CodeBlock · Label