#943
One menu per row
Three invoice rows, each its own context menu with a label, Open and Send reminder, and a 400 ms long-press delay for touch.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "One menu per row" pattern (@codeatlasdev/ui demo #943, navigation/context-menu) in my app.
Call get_demo({ ids: ["#943"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: A menu per list row: each row is a focusable region, so keyboard users reach the same actions with Shift+F10.
Keep these library parts, with the props and tokens the demo uses:
- ContextMenu, DropdownMenuItem, DropdownMenuLabel from "@codeatlasdev/ui"
Behaviour to keep:
- `{#each rows as row (row)}` renders `<ContextMenu class="cm-row" role="group" aria-label={row} longPressDelay={400}>` per row
- The `menu` snippet starts with `<DropdownMenuLabel>{row}</DropdownMenuLabel>` and has Open and Send reminder items
- Items set `last` to the action and the row name (Open or Send plus the invoice), shown under the list
Reduced motion: the demo handles it; keep that branch.
Keyboard: operable; keep the focus order and key handling.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- ContextMenu
@codeatlasdev/ui - DropdownMenuItem
@codeatlasdev/ui - DropdownMenuLabel
@codeatlasdev/ui
How it is built
- `{#each rows as row (row)}` renders `<ContextMenu class="cm-row" role="group" aria-label={row} longPressDelay={400}>` per row
- The `menu` snippet starts with `<DropdownMenuLabel>{row}</DropdownMenuLabel>` and has Open and Send reminder items
- Items set `last` to the action and the row name (Open or Send plus the invoice), shown under the list
Related
Loading source.