---
title: Keyboard Shortcut
description: Displays a platform-aware keyboard shortcut label for buttons, menus, tooltips, and helper text.
component: true
---
`KeyboardShortcut` renders a compact, platform-aware shortcut label from logical key names.
Use it for button accessories, menu shortcuts, tooltips, and helper copy. Avoid placing it directly inside button label text; render it in a right-side accessory slot such as `iconRight` instead.
## Usage
```tsx
import { KeyboardShortcut } from 'ui'
```
```tsx
```
## Props
### `keys`
An ordered array of logical key names.
```tsx
```
Supported special keys currently include:
- `Meta`
- `Alt`
- `Shift`
- `Enter`
- `Esc` / `Escape`
- `Tab`
Single-character keys are uppercased automatically.
## Variants
### Pill (default)
Use the default pill variant for menus, tooltips, and standalone shortcut chips.
```tsx
```
### Inline
Use the inline variant when the shortcut needs to sit on the same line as surrounding text or inside a button accessory slot.
```tsx
}>Apply
```
### Keycaps
Use the keycaps variant when each key needs its own cap, such as a search input that opens with a shortcut.
```tsx
```
## Examples
### Pill
### Inline
### Keycaps