Overlays v1.0.0

Context Menu

Right-click context menu with items, submenus, dividers, and keyboard shortcut display. Provides a native-feeling context menu experience triggered by right-click (contextmenu event), positioned at the cursor, with full keyboard navigation, submenu support, checkable items, and destructive action styling. Automatically adjusts position to stay within the viewport.

Preview & Code

Options

Name Type Default Description
items * Array required Array of item hashes. Regular: { label:, icon:, shortcut:, action:, destructive: }. Divider: { divider: true }. Submenu: { label:, icon:, children: [] }. Checkable: { label:, checked:, action:, checkable: true }.
trigger_selector String "parent" CSS selector or "parent" for the right-click trigger area. When "parent", wraps trigger in a div.

Changelog v1.0.0

- v1.0.0: Initial release with items, submenus, dividers, checkable items, and keyboard navigation

Get Full Access

Unlock the source code for this component and all others. One-time payment for lifetime access.

Get Access Now