Overlays
ContextMenu <pm-context-menu>
Context menu: right-click (or long-press, Shift+F10, the Menu key) inside this element opens the pm-menu referenced by menu at the pointer. The region itself stays fully interactive.
Right-click, long-press or Shift+F10 here
States
Each state is one attribute.
Right-click, long-press or Shift+F10 here
DisabledAttributes
| Attribute | Type | Default | Description |
|---|---|---|---|
mobile | boolean | — | Native mobile pattern on phones: opens as a swipeable bottom sheet (inherits from ancestors such as <html mobile>; mobile="false" opts out). |
menu | string | — | id of the pm-menu to open. |
disabled | boolean | — | Use the browser's own context menu instead. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Events
| Event | React / Svelte prop | Description |
|---|---|---|
pm-close | onPmClose | The menu it opened closed. |
pm-open | onPmOpen | The menu opened. |
Slots
| Slot | Description |
|---|---|
(default) | The region that owns the menu. |
Methods
openAt(), hide()