@cartridge-engine/key-hint
v3.0.0
Published
Text input with focus management
Readme
KeyHint
Display keyboard shortcut hints.
Props
| Prop | Type | Default | Description |
|------|------|---------|-------------|
| keys | { key: string; desc: string }[] | [] | Array of key-description pairs. |
Best Practice
<KeyHint keys={[
{ key: 's', desc: 'Start game' },
{ key: 'q', desc: 'Quit' },
]} />
// [s] Start game [q] Quit