When to use
Section titled “When to use”Kbd shows a shortcut or a key to press: in menu items, tooltips and help text.
When not to use
Section titled “When not to use”- To show code or a command: Use the code text style.
- As a clickable element: Kbd is not interactive; use a Button.
- As a placeholder when there is no shortcut: Do not draw an empty key.
Anatomy
Section titled “Anatomy”ControlK
import { Kbd, Provider } from '@bigbang/ui';
export default function Default() { return ( <Provider locale="en-GB"> <Kbd keys={['mod', 'K']} /> </Provider> );}- Key: an inner
<kbd>; a flat key on a muted fill, without a border. - Separator: a visual
+between keys; screen readers skip it. - Container: the outer
<kbd>around the combination.
Behaviour
Section titled “Behaviour”mod,ctrl,shift,alt,enter,escape,tab,backspaceand the four arrows are named.- Any other text (
K,F2) shows and is read as written. - The platform is detected in the browser; the server renders
other. Fix it withplatform. - On keys that show a symbol, the symbol is hidden and visually hidden text carries the name.
Guidelines
Section titled “Guidelines”- Give the keys in press order: modifiers first.
- Write letters in capitals:
K,S. - Show at most one shortcut per item.
Content
Section titled “Content”- The spoken names of named keys are library strings.
| Turkish | English |
|---|---|
| Komut | Command |
| Yukarı ok | Up arrow |
| Sekme | Tab |