Context Menu
A Context Menu is a popup menu that appears upon user interaction, such as a right-click or a hover.
Basic Usage
A Context Menu is composed of a context_menu.root
, a context_menu.trigger
and a context_menu.content
. The context_menu_root
contains all the parts of a context menu. The context_menu.trigger
is the element that the user interacts with to open the menu. It wraps the element that will open the context menu. The context_menu.content
is the component that pops out when the context menu is open.
The context_menu.item
contains the actual context menu items and sits under the context_menu.content
.
The context_menu.sub
contains all the parts of a submenu. There is a context_menu.sub_trigger
, which is an item that opens a submenu. It must be rendered inside a context_menu.sub
component. The context_menu.sub_content
is the component that pops out when a submenu is open. It must also be rendered inside a context_menu.sub
component.
The context_menu.separator
is used to visually separate items in a context menu.
In this example, we will show how to open a dialog box from a context menu, where the menu will close and the dialog will open and be functional.
API Reference
rx.context_menu.root
Menu representing a set of actions, displayed at the origin of a pointer right-click or long-press.
Context Menu (right click)
rx.context_menu.separator
Separates items in a context menu.
Props
No component specific props
Event Triggers
See the full list of default event triggersrx.context_menu.trigger
Wraps the element that will open the context menu.
Context Menu (right click)
Event Triggers
See the full list of default event triggersrx.context_menu.content
The component that pops out when the context menu is open.
Context Menu (right click)
rx.context_menu.sub_trigger
An item that opens a submenu.
Context Menu (right click)
Event Triggers
See the full list of default event triggersrx.context_menu.sub_content
The component that pops out when a submenu is open.
Context Menu (right click)