Examples
Basic
Rows of cells inside item-content.
-
Project ApolloBackend serviceActive2 hours ago
-
MercuryWeb frontendActive5 hours ago
-
GeminiData pipelinePausedYesterday
With headings
Heading cells plus pf-m-no-fill / pf-m-align-right cell
modifiers.
-
Primary content
Secondary content -
Secondary content (pf-m-no-fill)
Secondary content (pf-m-align-right pf-m-no-fill)
Compact
pf-m-compact — tighter rows.
-
user-1@example.comAdmin
-
user-2@example.comMember
-
user-3@example.comViewer
Plain
pf-m-plain removes row backgrounds and borders.
-
Primary contentSecondary content
-
Second rowMore content
Checkboxes, actions and additional cells
__item-control checks plus __item-action buttons; the third
row swaps a kebab for buttons at the lg breakpoint via responsive action modifiers.
-
Row with checkboxStatus: activeUpdated 2 hours ago
-
Second rowStatus: pausedUpdated yesterday
-
Responsive actions rowButtons at the lg breakpoint and upA kebab menu below it
Actions: single and multiple
A lone action button and a kebab menu of actions.
-
Single action rowA lone action button
-
Multiple actions rowA kebab menu of actions
Expandable
A toggle in the item control reveals __expandable-content.
-
Expandable row 1Toggle reveals details
-
Expandable row 2Collapsed by default
Compact expandable
pf-m-compact combined with live expandable rows.
-
Compact row 1Starts expanded
-
Compact row 2Collapsed by default
Nested expandable
The first row’s expandable content holds a nested data list with its own toggles.
-
Outer row 1Contains a nested data listSecondary content
-
Outer row 2Plain expandable details
Mixed expandable
Expandable and plain rows share one list.
-
Expandable rowHas a toggle and details
-
Plain rowNo toggle, no expandable content
Width modifiers
pf-m-flex-2/3/4/5 and pf-m-no-fill size individual cells.
-
defaultpf-m-flex-2 takes twice the spacepf-m-flex-3
-
defaultpf-m-flex-4 takes four times the space
-
defaultpf-m-flex-5 takes five times the space
-
pf-m-no-fill keeps to its contentdefault fills the remaining space
Clickable rows
pf-m-clickable rows; the active one carries pf-m-selected.
-
First rowClick or press Enter to select
-
Second rowThe selected row carries pf-m-selected
Clickable expandable rows
Rows select on click and expand via the toggle; both states are live.
-
First rowClick selects; the toggle expands
-
Second rowThe selected row carries pf-m-selected
Controlling text
pf-m-break-word / pf-m-truncate / pf-m-nowrap.
-
pf-m-break-wordReallyLongWordThatWouldOverflowTheCellWithoutAModifier-ReallyLongWordThatWouldOverflowTheCellWithoutAModifier-
-
pf-m-truncateReallyLongWordThatWouldOverflowTheCellWithoutAModifier-ReallyLongWordThatWouldOverflowTheCellWithoutAModifier-
-
pf-m-nowrapThis cell refuses to wrap its content onto a second line.
As grid
pf-m-grid stacks each row’s cells into a grid at every width.
-
Project ApolloBackend serviceActive2 hours ago
-
MercuryWeb frontendActive5 hours ago
Small grid breakpoint
pf-m-grid-sm stacks cells below the sm breakpoint.
-
Grid collapses below smCell twoCell three
-
Second rowCell twoCell three
With no grid
pf-m-grid-none keeps cells on one line at every width.
-
Project ApolloBackend serviceActive2 hours ago
-
MercuryWeb frontendActive5 hours ago
Draggable
Draggable rows — the single reorderable list and the multiple drop zones variant — live in the Drag and drop demo, which reorders this same data-list markup with the phaDragDrop pointer model.
Documentation
Data list props
The data list is a template family: data-list is the root and rows compose from
data-list-item > data-list-item-row >
data-list-item-control / data-list-item-content (>
data-list-cell) / data-list-item-action, plus
data-list-expandable-content — all main-block includes, no generic slot names.
| Name | Type | Description |
|---|---|---|
id / ariaLabel
|
String | DOM id; AT label for the list. |
compact / plain
|
Boolean |
The matching pf-m-* modifier.
|
gridBreakpoint
|
String |
Grid modifier suffix — "sm" renders pf-m-grid-sm.
|
data-list-item
|
Include |
expandable (owns the open state + bound
pf-m-expanded), startOpen,
clickable, selectedExpr (Alpine expression →
pf-m-selected), attrs.
|
data-list-item-control
|
Include |
expandToggle renders the toggle wired to open (+
toggleAriaLabel); otherwise the main block holds e.g. a
__check checkbox — toggle and custom content are mutually exclusive.
|
data-list-cell
|
Include |
Repeat per column; id, modifiers (e.g.
"pf-m-flex-2", "pf-m-truncate", "pf-m-no-fill").
|
data-list-item-action
|
Include |
Trailing actions; attrs for kebab positioning/state.
|
data-list-expandable-content
|
Include |
The region open reveals; content lands inside the body wrapper.
|
attrs
|
String (raw) | Raw attribute passthrough (root and most members). Shadowed inside the family's inserts. |
Usage
Data list vs. Table. Data list is a list of items where rows can vary in content; Table is a grid with column headers and consistent shapes per row. Use Data list when rows benefit from rich inner layout.