Context Menu
The Menu opened by right click on desktop and long press on touch screens, anchored to the pointer.
import { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuItem, … } from "pleate/context-menu";Right click or long press
Right-click or long-press
Props
- ContextMenuTrigger
The area that listens for right click and long press.
asChild, disabled- ContextMenuItem
One action.
icon, shortcut, destructive, inset, disabled, onSelect- ContextMenuCheckboxItem / ContextMenuRadioItem
Toggles and single choice.
checked / value- ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent
Nested menu.
- ContextMenuLabel / ContextMenuSeparator
Heading and divider between groups.
Accessibility
- menu / menuitem roles, arrow keys, typeahead, Escape.
- Offer the same actions elsewhere (a Menu button): right click and long press are not discoverable.