Context Menu

Displays actions from a right click, long press, or keyboard context-menu command.

Basic

Menu items accept normal LiveView bindings. Put phx-click on the item, and pass context with phx-value-* or phx-target when the action belongs to a component.

With Shortcuts

Display keyboard hints with the shortcut prop on context_menu_item .

With Shortcuts

Checkbox And Radio Items

Use context_menu_checkbox_item for toggleable boolean states and context_menu_radio_item for mutually exclusive choices. Both show an indicator when checked.

Checkbox And Radio

Nest context_menu_sub with a :trigger slot and menu items to build submenus. Submenus open on hover (mouse) and on Right-arrow (keyboard); Left-arrow or Escape closes them.

With Submenu