KeyHints

The keys available right now, along one line.

import { KeyHints } from '@textui/core';

<KeyHints hints={[{ keys: 'q', label: 'quit' }, { keys: 'r', label: 'refresh' }]} />

Props

| Prop | Type | Default | | | — | — | — | — | | hints | { keys: string; label: string }[] | required | | | separator | string | | |

Plus everything on BoxProps.

A terminal UI has no menus to discover, so this is usually the only place a reader learns what the keys are. Keep it to the keys that work here - a hint line listing everything the application can do teaches nothing.

Commands registered with the hints slot can populate this from the registry rather than from a literal, which keeps the line honest as the screen changes.

See also


Back to top

MIT licensed. Pre-1.0 - the surface is still moving.