Skip to main content

Context Menu

Display contextual actions on right-click, built on Base UI.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
triggerReactNode-The right-clickable tile's label, such as a file name.
The right-clickable tile's label, such as a file name.
triggerIconReactNode-A glyph in a well above the label, such as the file's type.
A glyph in a well above the label, such as the file's type.
itemsContextMenuItem[]-
iconbooleantrue
iconPositionleading | trailingleading
openboolean-
onOpenChange(open: boolean) => void-
shapesquare | rounded | squircle | pillrounded
disabledbooleanfalseBlocks the menu from opening at all & dims the trigger.
Blocks the menu from opening at all & dims the trigger.
animatedbooleantrue
containerHTMLElement | null-