Keybind
Keys as keycaps, in the platform’s order.
⌘K⌘⇧P⌥Space
Features
- Keys as keycaps.
Use it for
- Menus and help text.
Installation
- Get runets.
git clone https://github.com/ziyam-khan/runets - Copy these files into your project, keeping their folders.
- Install what they use.
pnpm add react - Load the styles once. Bring your own base tokens, or use runets’ default theme.
import 'runets/styles/theme.css' import 'runets/styles/kit.css'
Usage
import { Keybind } from 'runets'
<Keybind keys={['⌘', 'K']} />API
| Prop | Type | What it does |
|---|---|---|
keys | string[] | The keys, in order. |
Accessibility
- Named with its keys as one label.
Source
The code is in src/kit/controls.tsx in runets, MIT licensed.