Context Menu

Context Menu

Displays a menu to the user — such as a set of actions or functions — triggered by a button or right-click.

Default

Right-click the area below to open the context menu.

Right click here

With Icons

Add Lucide icons to context menu items for improved usability.

Right click for icon menu

With Labels and Groups

Organize menu items using labels and separators.

Right click for grouped menu

With Destructive Item

Destructive actions are styled to draw attention to their danger.

Right click for destructive actions

With Inset Items

Use Inset to align items that don't have an icon with items that do.

Right click for inset demo

On Image

Context menus can be triggered on any element, including images.

placeholder

With Checkbox Items

Toggle states using checkbox menu items.

Right click for checkbox items
Toolbar: on Sidebar: off Status Bar: on

With Radio Items

Single-selection using radio menu items.

Right click for radio items

View mode: grid

With Submenus

Organize complex menus with nested submenus.

Right click for submenu

Features

  • Opens on right-click (contextmenu event)
  • Positioned at mouse cursor location
  • Closes on outside click or Escape key
  • Full keyboard navigation (↑/↓, Enter, Escape)
  • Support for disabled items
  • Keyboard shortcut hints
  • Separator and label components

Keyboard Navigation

↑/↓ Navigate items
Enter/Space Select item
Escape Close menu

API Reference

Component parameters and their types.

Prop Type Default Description
ChildContent RenderFragment? null ContextMenuTrigger and ContextMenuContent.
Disabled bool false On ContextMenuItem: prevents interaction when true.
Inset bool false On ContextMenuItem/Label: adds left padding to align with icon items.
Checked bool false On ContextMenuCheckboxItem: the checked state. Use @bind-Checked.
Value TValue On ContextMenuRadioItem: the value this item represents.
Class string? null Additional CSS classes.
OnClick EventCallback On ContextMenuItem: callback invoked when the item is clicked.

Reconnecting...

Attempting to rejoin the server

Connection Lost

Retrying in seconds

Connection Failed

Failed to rejoin the server.
Please retry or reload the page.

Session Paused

The session has been paused by the server

Resume Failed

Failed to resume the session.
Please reload the page.