ShortcutScope
DOM-bound view or pane scope activated by keyboard focus in its descendants.@gemologic/sheen · applicationPlayground
This example has no scalar controls. Its validated source remains interactive below.
<ShortcutProvider development={true}><ShortcutScope scope="inspector"><Button>Inspect</Button></ShortcutScope></ShortcutProvider>Variant matrix
Inspector pane
Anatomy
- Package
@gemologic/sheen- Source
packages/ui/src/primitives/ShortcutScope.tsx- Tokens
- None
Accessibility
Role: none by defaultKeyboard: Descendant keyboard events activate the innermost scopeDo
- Use distinct IDs for simultaneously mounted panes/views.
- Place controls inside the native scope boundary; it adds no tab stop or layout styling.
Do not
- Do not assume portalled children retain DOM focus ancestry.
- Do not use global as a scoped ID; open dialogs suspend focus scopes.
Generated props
| Name | Type | Default | Description |
|---|---|---|---|
scope * | string | — | Required unique non-global ID matching useShortcut registrations. Changes release the old scope and cancel pending input. |