# Kbd

Displays a keyboard key or shortcut. Use it in instructions and menus to communicate available keyboard actions.

Package: `@kela-systems/ui-components` 4.1.0

```tsx
import { Kbd, KbdGroup, kbdVariants } from "@kela-systems/ui-components";
```

Links (Kela sign-in needed): [Storybook](https://main--6af1efd9453270bb59a6c00c.chromatic.com/?path=/docs/components-kbd--docs), [Source](https://github.com/Kela-Systems/kela/tree/main/packages/next/ui-components/src/kbd), [Figma](https://www.figma.com/design/anhlwrbFM6mUiL0klxeK1I/ARK---Design-System?node-id=18665-239)

## Examples

### Default

```tsx
import { Kbd, KbdGroup, Stack } from "@kela-systems/ui-components";

export default function KbdDefault() {
  return (
    <Stack direction="row" gap={4} align="center" wrap>
      <Kbd>Esc</Kbd>
      <Kbd variant="primary">Enter</Kbd>
      <KbdGroup>
        <Kbd>⌘</Kbd>
        <Kbd>K</Kbd>
      </KbdGroup>
      <KbdGroup separated>
        <Kbd>Ctrl</Kbd>
        <Kbd>Shift</Kbd>
        <Kbd>M</Kbd>
      </KbdGroup>
    </Stack>
  );
}
```

## Props

A `className` on a part adds layout only: placement, sizing and spacing. Pick a look with a variant.

### Kbd

| Variant | Values | Default |
| --- | --- | --- |
| `variant` | `default`, `primary` | `default` |

Also takes the attributes of the HTML element it renders.

### KbdGroup

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `separated` | `boolean` | `false` | Joins the keys with a "+" separator, e.g. Ctrl + Alt + Shift + B. |

Also takes the attributes of the HTML element it renders.

### Also exported

- `kbdVariants` (variants)
