# Kbd

Display readable keyboard shortcuts.

## How to use it

Describe an existing shortcut in your application. Kbd only displays the keys; register the keyboard event in your own code.



## Import


```tsx
import { Kbd } from "@kivora/nextjs";
```


Examples run in a Client Component. Also import the hooks, icons and dependencies used. This is the web API; consult the native guide for React Native.

## Example


```tsx
<div style={{ display: "flex", alignItems: "center", gap: 12, flexWrap: "wrap" }}>
  <Kbd>⌘</Kbd><Kbd>K</Kbd>
</div>
```


## API: Kbd


```typescript
Kbd: React.ForwardRefExoticComponent<KbdProps & React.RefAttributes<HTMLElement>>
```


| Property | Type | Required | Description |
| --- | --- | --- | --- |
| aria-label | string | No | Accessible name of the control. |
| children | ReactNode | No | Content or child elements of the component. |
| className | string | No | Additional CSS classes to customize the element. |
| defaultChecked | boolean | No | Initial selection of the control. |
| defaultValue | string \| number \| readonly string[] | No | Initial value when the component manages its own state. |
| id | string | No | Element identifier; associates labels and descriptions. |
| onChange | ChangeEventHandler<HTMLElement, Element> | No | Change event. Check the type: some controls return an object, others a DOM event. |
| onClick | MouseEventHandler<HTMLElement> | No | Action performed when the element is activated. |
| onSubmit | SubmitEventHandler<HTMLElement> | No | Form submission event. |
| role | AriaRole | No | Semantic role of the element. Keep the default role unless a change is justified. |
| size | "sm" \| "lg" \| "md" \| null | No | Visual size of the component. |
| style | CSSProperties | No | React inline styles. |
| tabIndex | number | No | Keyboard focus order and availability. |
| title | string | No | Title or supplementary information. |
| variant | "default" \| "outline" \| "solid" \| null | No | Visual variant. Use a value supported by this component. |

Source: https://kivora.pro/docs/componentes/kbd
