?-triggered modal; on-screen keycaps depress on physical keydown while open
Mount once per page and press ? to open. Closes on Escape or another ?. Ignored while typing in inputs. While open, physical keydowns depress the matching on-screen keycap (translateY(1px) + tint, 80ms).
Or press ? anywhere on this page — then press any key to see keycap depress
Groups shortcuts by context (Navigation / Selection / Actions)
Marks & jumps / list motions sections appended after the primary content, before the meta rows — works with sections, registry or flat shortcuts
One mode="host" overlay aggregates the sections of every mode="auto" instance on the page — the "Inbox" and
"Composer" contributors above render nothing themselves but appear in
the host panel under their sectionTitle. When no host is
mounted, contributors self-render instead (the portal / contract-page
fallback).
| Prop | Type | Default | Description |
|---|---|---|---|
shortcuts | KeyboardShortcut[] | [] | Flat list of {key, description} |
sections | KeyboardShortcutSection[] | - | Grouped sections (overrides flat list) |
registry | ShortcutRegistry | - | Read active sections from a shortcut registry (ignored when sections given) |
extraSections | KeyboardShortcutSection[] | - | App-provided sections appended after the primary content, before the meta rows |
extra | Snippet | - | Custom footer snippet rendered just above the meta rows |
title | string | "Keyboard Shortcuts" | Modal heading |
open | boolean | false | Bindable open state |
mode | 'auto' | 'host' | 'standalone' | 'auto' | 'host' makes this the global overlay that aggregates contributors; 'auto' contributes to a host when one exists and self-renders otherwise; 'standalone' always self-renders |
sectionTitle | string | "Page shortcuts" | Label under which this instance's sections appear in the host panel when contributing |
showHint | boolean | true | Show the closed-state press-? hint pill; false opts out (contributors that defer to a host never show one) |