Menu <pm-menu>
Menu (role="menu") opened from a button with popovertarget. Arrow keys, Home/End and typeahead.
Overview
Items: <button role="menuitem"> or <a role="menuitem">. role="menuitemcheckbox" toggles and role="menuitemradio" picks one within its role="group" (or the menu); both show a tick from aria-checked. A submenu is a nested <pm-menu id="x"> opened by an item with popovertarget="x": it opens on hover, click and Arrow Right, and closes with Arrow Left or Escape.
Attributes
| 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). |
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-select | onPmSelect | An item was chosen. detail.checked is there for checkbox and radio items. |
Slots
| Slot | Description |
|---|---|
(default) | Menu items: <button role="menuitem">, <a role="menuitem">, <hr> separators, nested <pm-menu> submenus. |
Used in templates
Overview dashboardTraffic analyticsOrdersCustomer 360InboxTeam chatAI assistantNotificationsProject boardTeam and rolesBilling and invoicesUser profileAccount settingsPricing plansProduct pageShopping cartCheckoutLanding pageArticleChangelogHelp centreContactAppointment booking