List <pm-list>
List of rows (settings, inboxes, contacts, search results). Rows have leading media, a heading, a description and trailing meta or actions. divided adds separators, bordered a frame.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
divided | boolean | false | Lines between rows. |
bordered | boolean | false | Border around the list. |
label | string | — | Accessible name of the list. |
Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.
Slots
| Slot | Description |
|---|---|
(default) | pm-list-item elements. |
<pm-list-item>
One list row. With href the row is a link; with interactive it is a button that fires pm-select.
Swipe actions (mail, chat and task apps): put buttons in the swipe-start / swipe-end slots. On touch screens the row slides sideways to reveal them (one open row per list; a tap elsewhere closes it). They never depend on swiping: moving keyboard or screen reader focus onto an action opens the row to that side, and open / close() control it from code.
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
icon-startprop: iconStart | string | — | Registered icon name shown before the content (see registerIcons); a start slot overrides it. |
icon-endprop: iconEnd | string | — | Registered icon name shown after the content (see registerIcons); an end slot overrides it. |
heading | string | — | Title text. |
description | string | — | Supporting text under the title. |
href | string | — | Make the whole row a link. |
value | string | — | Current value. |
interactive | boolean | false | Make the whole row a button. |
selected | boolean | false | Whether this item is selected. |
disabled | boolean | false | Not interactive (and not submitted, for form controls). |
open | 'start' | 'end' | — | Which swipe actions are showing: start, end, or none. |
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-swipe | onPmSwipe | The row opened to a side (or closed: detail.side is null). |
pm-select | onPmSelect | An interactive row was activated. |
Slots
| Slot | Description |
|---|---|
swipe-start | Actions revealed by swiping toward the end (e.g. Archive, Mark read). |
swipe-end | Actions revealed by swiping toward the start (e.g. Delete). |
start | Leading avatar, icon or checkbox. |
(default) | Extra content under the description. |
end | Trailing meta, badge or actions. |
Methods
close()
Used in templates
InboxTeam chatAI assistantNotificationsTeam and rolesUser profileAccount settingsProduct pageShopping cartChangelogHelp centreContactNot found (404)Onboarding wizardAppointment booking