Skip to content

Component ShortcutHint

MeowLynxSea edited this page Jun 18, 2026 · 4 revisions

ShortcutHint

A labelled keybinding — e.g. ⌘S. Useful inside menu items, tooltips, or buttons that document their accelerator.

use yororen_ui::headless::shortcut_hint::shortcut_hint;

shortcut_hint("save-hint", "Save", ["Cmd", "S"], cx).render(cx)

No builder methods. Factory takes (id, label, keys, _cx) where keys is any iterator of key-cap strings. Each item becomes a separate key cap.

.render(cx) returns Stateful<Div>.

See also: KeybindingInput, Button, Tooltip.

Clone this wiki locally