Docs
πŸ—οΈ ⏐ Components
Layers
Context Menu

Context Menu

The Context Menu component offers contextual options or actions that appear when a user right-clicks an element

Examples

API

PropDescriptionDefault
children *Child element to trigger the context menu.
ReactNode
content *Content to show in the context menu.
any
disabledWhether the context menu is disabled.
boolean
autofocusWhether the context menu should autofocus on open.
boolean
true
autoCloseWhether the context menu should close on click.
boolean
true
triggerClassNameClass name to apply to the trigger element.
string
triggerOpenClassNameClass name to apply to the trigger when the context menu is open.
string
themeTheme for the Context Menu.
ContextMenuTheme
referenceReference of the overlay to align to.
ReferenceProp
triggerType of trigger to open the overlay.
TriggerTypes | TriggerTypes[]
triggerElementTrigger element to open the overlay.
any
portalClassNamePortal classname.
string
closeOnBodyClickClose when the body is clicked or not.
boolean
true
closeOnEscapeClose when escape is pressed or not.
boolean
true
appendToBodyAppend the overlay to the body. Almost always want this.
boolean
elementTypeOverlay element type.
string
modifiersPosition modifiers.
Modifiers
followCursorOverlay should follow cursor or not.
boolean
placementPlacement of the overlay.
Placement
onOpenEvent called when the overlay is opened.
(event?: any) => void
onCloseEvent called when the overlay is closed.
(event?: any) => void