# Kbd

- **[Atoms](/components/)**

A keyboard key, for shortcuts in text and menus.

## When to use

- **Use for**: Keyboard shortcuts in text and menus.
- **Not for**: Decoration.
- **Pairs with**: Search triggers, help text.

## Preview

kbd.tsx

```
import { Theme } from '@/components/klarhimmel/theme/style';
import { Kbd } from '@/components/klarhimmel/ui/kbd';

export default function Example() {
  return (
    <Theme theme="brand">
      <p>Press <Kbd>⌘</Kbd> <Kbd>K</Kbd> to search.</p>
    </Theme>
  );
}
```

## Import

- **CLI**

  ```
  npx shadcn add @klarhimmel/kbd
  ```
- **Import**

  ```
  import { Kbd } from '@/components/klarhimmel/ui/kbd';
  ```

- **Files**: kbd.tsx, in components/klarhimmel/ui/. With it: theme, utils.
- **Render in**: Render it inside <Theme>, once near the root of your app. Tokens and fonts are scoped to it, so outside it the component is unstyled.

## Props

- **children**: Required. The key.
- **className**: Extra classes, merged after the component's own.

## Accessibility

- Tab · Skips it: Kbd only displays a key

[Accessibility](/get-started/accessibility)

Screen readers read the key as text. Write what it does next to it.

[Previous](/components/status-dot)

[Next](/components/icon-button)
