# Kbd

> Show a keyboard key or shortcut.

- Category: Data display
- Import: `import { Kbd } from "@sagui/ui";`
- Page: /components/kbd

```tsx
import { Kbd } from "@sagui/ui";

export function Hero() {
  return (
    <div className="flex items-center gap-4">
      <Kbd keys={["⌘", "K"]} />
      <Kbd keys="Esc" />
      <Kbd keys="⌘ D" variant="plain" />
    </div>
  );
}
```

## When to use

- Shortcut hints in menus, tooltips and search.

## When not to use

- Use Badge for status or counts.

## Installation

Install the package and import the styles once. The [installation guide](/docs/installation) covers the Tailwind setup.

```bash
npm install @sagui/ui
```

## Usage

```tsx
import { Kbd } from "@sagui/ui";

<Kbd keys={["⌘", "K"]} />
```

## Accessibility

- Renders `kbd` elements, so screen readers announce them as keys.
