Fine-tune light, shadows, borders, neumorphic
Light and shadows
Borders
Neumorphic
Data

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.

Full screen
Owner Editor Resend Archive Delete Delete

Props

<script type="module"> import '@prismora/css'; import '@prismora/elements/avatar'; import '@prismora/elements/badge'; import '@prismora/elements/button'; import '@prismora/elements/list'; import { registerIcons } from '@prismora/elements/icon'; import { archive, mail, trash } from '@prismora/icons'; registerIcons([archive, mail, trash]); </script> <pm-list label="Team" bordered divided> <pm-list-item heading="Ada Lovelace" description="[email protected]" href="#ada"> <pm-avatar slot="start" name="Ada Lovelace"></pm-avatar> <pm-badge slot="end" tone="success">Owner</pm-badge> </pm-list-item> <pm-list-item heading="Grace Hopper" description="[email protected]" href="#grace"> <pm-avatar slot="start" name="Grace Hopper"></pm-avatar> <span slot="end">Editor</span> </pm-list-item> <pm-list-item heading="Alan Turing" description="Invited 2 days ago"> <pm-avatar slot="start" name="Alan Turing"></pm-avatar> <pm-button slot="end" size="sm" variant="ghost">Resend</pm-button> </pm-list-item> </pm-list> <pm-list label="Inbox (swipe a row on a phone, or Tab to its actions)" divided style="margin-block-start: 1rem"> <pm-list-item heading="Weekly report" description="Swipe left to delete, right to archive" icon-start="mail" interactive> <pm-button slot="swipe-start" size="sm" tone="success" icon-start="archive">Archive</pm-button> <pm-button slot="swipe-end" size="sm" tone="danger" icon-start="trash">Delete</pm-button> </pm-list-item> <pm-list-item heading="Invoice #2041" description="Paid · 2 days ago" icon-start="mail" interactive> <pm-button slot="swipe-end" size="sm" tone="danger" icon-start="trash">Delete</pm-button> </pm-list-item> </pm-list>

Attributes

AttributeTypeDefaultDescription
dividedbooleanfalseLines between rows.
borderedbooleanfalseBorder around the list.
labelstring—Accessible name of the list.

Also accepts the contextual attributes tone, surface, radius, density, motion, elevation. They are inherited from ancestors' data-* attributes.

Slots

SlotDescription
(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

AttributeTypeDefaultDescription
icon-start
prop: iconStart
string—Registered icon name shown before the content (see registerIcons); a start slot overrides it.
icon-end
prop: iconEnd
string—Registered icon name shown after the content (see registerIcons); an end slot overrides it.
headingstring—Title text.
descriptionstring—Supporting text under the title.
hrefstring—Make the whole row a link.
valuestring—Current value.
interactivebooleanfalseMake the whole row a button.
selectedbooleanfalseWhether this item is selected.
disabledbooleanfalseNot 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

EventReact / Svelte propDescription
pm-swipeonPmSwipeThe row opened to a side (or closed: detail.side is null).
pm-selectonPmSelectAn interactive row was activated.

Slots

SlotDescription
swipe-startActions revealed by swiping toward the end (e.g. Archive, Mark read).
swipe-endActions revealed by swiping toward the start (e.g. Delete).
startLeading avatar, icon or checkbox.
(default)Extra content under the description.
endTrailing meta, badge or actions.

Methods

close()

Used in templates

InboxTeam chatAI assistantNotificationsTeam and rolesUser profileAccount settingsProduct pageShopping cartChangelogHelp centreContactNot found (404)Onboarding wizardAppointment booking