ContextMenu

Context menus display a list of choices on a temporary surface, opened from the element they act on.

Props

React props
NameTypeRequiredDefaultDescription
variantMenuVariantNo'standard'Visual color treatment shared by the menu family.
accessibleLabelstringNo—Accessible name used when no external labelled-by relationship exists.
disabledbooleanNofalsePrevents pointer and keyboard context-menu activation.
triggerReactNodeYes—Element that receives pointer and Shift+F10 context-menu activation.
childrenReactNodeNo—MenuItem, MenuGroup, and MenuHeadline content.
onOpenChange(open: boolean) => voidNo—Notifies visibility changes caused by user interaction.
classNamestringNo—Classes applied to the display-contents root.