On this page
@addTagHelper *, Webority.Ui.RazorUnder a list
Show a list's keys so reviewers can move with J and K, tick with X and search with a slash.
A review queue
Keyboard shortcuts
- J
- Next request
- K
- Previous request
- /
- Search
- ?
- Show these shortcuts
Keys on the actions
Put a key on the action it runs, so the key shows on the button as well as in the legend.
Approve with the A key
Every option
Every value of every prop, one cell each.
shortcuts: the rows
no app-shortcut rows (default)Keyboard shortcuts
- ?
- Show these shortcuts
<app-shortcut key="j" label="Next request">Keyboard shortcuts
- J
- Next request
- ?
- Show these shortcuts
group="Decide" under its own headingKeyboard shortcuts
Decide
- A
- Approve
Notes
- N
- Add a note
- ?
- Show these shortcuts
onPress (React only): runs the row's action; Razor uses targetKeyboard shortcuts
- A
- Approve
- ?
- Show these shortcuts
target="#every-option-approve": clicks that control on its keyKeyboard shortcuts
- A
- Approve
- ?
- Show these shortcuts
open
open="false": closedKeyboard shortcuts
- ?
- Show these shortcuts
open="true": the sheet shown openKeyboard shortcuts
- ?
- Show these shortcuts
onOpenChange
onOpenChange (React only): called when the sheet opens or closesKeyboard shortcuts
- ?
- Show these shortcuts
trigger
trigger="true" (default)Keyboard shortcuts
- ?
- Show these shortcuts
trigger="false": no button; ?, open or a data-wui-shortcuts-open element opens itKeyboard shortcuts
- ?
- Show these shortcuts
items
items=".legend-demo-link": no visible effect; J and K move between the matching itemsKeyboard shortcuts
- ?
- Show these shortcuts
search
search="#legend-q": no visible effect; / focuses the matching fieldKeyboard shortcuts
- ?
- Show these shortcuts
className
class="legend-demo-extra": extra classes on the legend rootKeyboard shortcuts
- ?
- Show these shortcuts
Guidance
What to do, and what to avoid.
Use it when
- A queue or list someone clears every day.
- A screen whose frequent actions have single-key shortcuts.
Reach for something else when
- Screens used now and then. → visible buttons only
- Phone-only screens (no keyboard). → visible buttons only
Reference
Try every prop, read the full list, and check keyboard and screen reader behaviour.
5 props. The 4 most used come first.
Used on most screens 4 props
| Prop | Type | Default | Description |
|---|---|---|---|
| itemsdefault - | string | - | CSS selector of the items that J and K move between, inside the scope. |
| searchdefault - | string | - | CSS selector of the field that / focuses. |
| triggerdefault true | bool | true | false renders no button; the sheet opens from ?, open, or a data-wui-shortcuts-open element. |
| opendefault - | bool | - | Controlled open state of the sheet. |
Less common 1 props
| Prop | Type | Default | Description |
|---|---|---|---|
| app-shortcutdefault - | child | - | A row: key (one character, or Enter, Esc, /) and label (required), and target, a selector the key clicks, and group, the heading it sits under. ? is always the last row. |
Screen reader
3 notes- A toggle button opens the sheet, which is a dialog; the button reports aria-haspopup, aria-expanded and aria-controls, and carries aria-keyshortcuts for the ? key.
- Keys typed into a field, or held with Ctrl, Cmd or Alt, do nothing, so typing is never taken over.
- Esc or a click outside closes the sheet, and the close button is named.