Context Menu
A menu of actions and options that opens at the pointer on a right-click, or on a long press, one row to each.
Usage
Examples
Tones
tone on an item is neutral by default, or destructive, its words in the destructive colour and its highlight tinted, for an action that cannot be undone.
Sizes
size steps the rows with their words and icons, and the labels, shortcuts and ticks with them, at the same width: sm 28px rows with 12px words, base 32px rows with 14px words (the default) or lg 40px rows with 16px words on a phone and 14px from 640px; a submenu takes its menu's size, and a right-click or a long press on each area opens its own menu.
Border radius
borderRadius sets the menu's corners on the kit's one scale: none, xs 4px, sm 6px, base 8px, lg 12px (the default) or xl 16px, its rows keeping inside them; a right-click or a long press on each area opens its own menu.
With icon
An Icon before an item's words is drawn at the row's icon size, in the row's colour.
Shortcuts
ContextMenuShortcut writes an item's keyboard shortcut at its end.
Inset
inset indents an item, a label or a sub-trigger so its words line up with the checkbox and radio items', beside an item as it is by default.
Checkbox item
ContextMenuCheckboxItem is ticked through checked, true or indeterminate for a dash, and unticked by default.
Radio item
ContextMenuRadioItems in a ContextMenuRadioGroup hold one value between them, a dot marking the item that has it.
Groups
ContextMenuGroup gathers items under a ContextMenuLabel, and a ContextMenuSeparator draws a line between groups.
Disabled
disabled dims an item and skips it in the arrow keys, beside an item as it is by default.
API Reference
It takes the props of Radix ContextMenu.Root.