This part takes no options of its own: it is set by what you put in it.
What an agent sees
ContextMenuTriggerThe area that opens the menu
ContextMenuPortalThe portal a menu's content goes through (ContextMenuContent writes its own)
ContextMenuContentThe menu's panel (role="menu", named by aria-label), its corner at the pointer
ContextMenuGroupA group of rows (role="group"), named by a ContextMenuLabel inside it
ContextMenuLabelA heading over a group of rows
ContextMenuShortcutA row's key hint
ContextMenuItemOne row (role="menuitem")
ContextMenuCheckboxItemA row that turns a setting on or off (role="menuitemcheckbox")
ContextMenuRadioGroupA choice of one among its rows
ContextMenuRadioItemOne row of a ContextMenuRadioGroup (role="menuitemradio")
ContextMenuSeparatorA line between groups of rows (role="separator")
ContextMenuSubA sub menu's root
ContextMenuSubTriggerThe row that opens a sub menu
ContextMenuSubContentA sub menu's panel (role="menu"), the menu's skin, beside its row, its first row level with it (the skin's lift, shared with the dropdown's sub menu)
Paste the prompt below into your coding agent. It reads Goop's install steps, installs the part and its tokens once, then reuses this same Context menu on every screen instead of drawing a new one: the same height, the same focus ring, the same spacing. As a Pro part, its command comes from Goop's server once you sign in, with a one-time link that lasts ten minutes.
On the focused target: open the menu just below its row at its start edge (above the row where the room below is short), the first row active, the browser's own menu kept shut
ArrowDownArrowUp
Move the active row, skipping a disabled one
HomeEnd
First or last row
Accessibility
The behaviour layer under the part answers keys, focus and dismissal: never write your own.
Notes for AI
Give your coding agent this page as text instead of screenshots: the parts, the options, the states and the keys. An agent that reads the real part builds the real part, not a lookalike.
goop.so/themes/trail/components/context-menu.md · the page as Markdown