Kbd
A styled element to indicate a keyboard shortcut.
Press ⌘ + K to open
<p>Press <Kbd>⌘</Kbd> + <Kbd>K</Kbd> to open</p>
Kbd — <kbd> HTML stylé pour indiquer un raccourci clavier. Petit rendu bord clair + monospace. À combiner avec du texte (ex : "Press ⌘K to open").
Installation
$ bext ui add kbd
Copy and paste the following into src/components/ui/kbd.tsx.
<p>Press <Kbd>⌘</Kbd> + <Kbd>K</Kbd> to open</p>
Usage
Anatomy
<Kbd>⌘K</Kbd>
API Reference
Kbd
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Le raccourci (symbole ou lettre). |
| className | string | — | undefined |
Accessibility
Élément sémantique <kbd>. Les AT annoncent "clé <Kbd>⌘</Kbd> + <Kbd>K</Kbd>.
On This Page