KeyHints
A one-line shortcut footer — accent keys, dim labels, faint separators, e.g. r reload · d devices · q quit. Deliberately lighter than StatusBar: no chips, no fill.
Import
import { KeyHints } from '@sigx/terminal';
import type { KeyHint } from '@sigx/terminal';
Usage
/** @jsxImportSource @sigx/terminal */
import { component, defineApp, KeyHints } from '@sigx/terminal';
import type { KeyHint } from '@sigx/terminal';
const hints: KeyHint[] = [
{ key: 'r', label: 'reload' },
{ key: 'd', label: 'devices' },
{ key: 'q', label: 'quit' },
];
const App = component(() => {
return () => (
<box>
<KeyHints hints={hints} separator=" · " />
</box>
);
});
defineApp(<App />).mount({ clearConsole: true });
Props
| Prop | Type | Notes |
|---|---|---|
hints | KeyHint[] | required — the shortcuts |
separator | string | between hints |
KeyHint
interface KeyHint {
key: string;
label: string;
}
See also
- StatusBar — a heavier chip footer.
