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 hairline between two groups of rows (role="separator"), the panel's full width
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 at its inline end and 4 px off the menu's panel (7 px off the row, the dropdown menu's sub menu's gap), its first row level with that row (3 px up, the panel's own inset)
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.
Also known as: Right-click menu, Long-press menu, Row actions menu.
Never put an action in the context menu alone: a right-click, a long press and Shift+F10 are all hidden. Pair it with a visible more-actions IconButton opening a DropdownMenu of the same rows: one array mapped into both.
API reference
Parts
Part
What it is
ContextMenuTrigger
The area that opens the menu
ContextMenuPortal
The portal a menu's content goes through (ContextMenuContent writes its own)
ContextMenuContent
The menu's panel (role="menu", named by aria-label), its corner at the pointer; by the keys, below the row (above it when the room is short)
ContextMenuGroup
A group of rows (role="group"), named by a ContextMenuLabel inside it
ContextMenuLabel
A heading over a group of rows
ContextMenuShortcut
A row's key hint
ContextMenuItem
One row (role="menuitem")
ContextMenuCheckboxItem
A row that turns a setting on or off (role="menuitemcheckbox")
ContextMenuRadioGroup
A choice of one among its rows
ContextMenuRadioItem
One row of a ContextMenuRadioGroup (role="menuitemradio")
ContextMenuSeparator
A hairline between two groups of rows (role="separator"), the panel's full width
ContextMenuSub
A sub menu's root
ContextMenuSubTrigger
The row that opens a sub menu
ContextMenuSubContent
A sub menu's panel (role="menu"), the menu's skin, beside its row at its inline end and 4 px off the menu's panel (7 px off the row, the dropdown menu's sub menu's gap), its first row level with that row (3 px up, the panel's own inset)
ContextMenuCheckboxItem
A row that turns a setting on or off (role="menuitemcheckbox").
icon?: IconName — A pack icon's name, drawn in the 16 px box before the row's words; left out, the row draws no icon.
variant?: 'default' | 'destructive' = 'default' — destructive: the row that deletes or cannot be undone — the dropdown menu's red row: its words in the theme's red, its icon in the lighter coral, a pale red wash under the pointer and the keys; it picks, closes and fades when disabled as any row.
A sub menu's panel (role="menu"), the menu's skin, beside its row at its inline end and 4 px off the menu's panel (7 px off the row, the dropdown menu's sub menu's gap), its first row level with that row (3 px up, the panel's own inset).
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 lit, the browser's own menu kept shut
ArrowDownArrowUp
Move the lit 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/meadow/components/context-menu.md · the page as Markdown