Introducing a new way to review your PRs.

Read the announcement

frappe / frappe-ui

The all-in-one toolkit for modern frontends. High-quality components, app recipes and AI-ready docs.

View on GitHub

28 documents · Updated Nov 23, 2026

docs / list-view

List view

The experimental list view presents structured records in a scrollable surface with columns, optional groups, row actions, selection, and empty or paging states. It is a config-driven component that can also be assembled from smaller exported parts; use the experimental features page for its product context and the rich-text editor, experimental calendar, and experimental theme switcher pages for related experimental UI surfaces.

Container

List configuration

The ListView container connects the data model to the list parts. A caller supplies column definitions, row data, and a required key that identifies each row. Options then control links, clicks, selection, tooltips, column resize, row height, and the empty state.

InputPurpose
columnsDefines the visible fields and their display rules.
rowsSupplies either a flat row set or grouped row objects.
rowKeyIdentifies a row for rendering and selection.
optionsEnables list behavior and supplies display settings.

The container provides shared list state to its child parts. A caller can use the default layout or replace it with a slot while still receiving the grouped-row and selectable state needed to build a custom layout.

The following diagram shows how the container chooses the main content and places selection feedback around it.

flowchart TD
    A[Columns and rows] --> B[List view container]
    B --> C[Header]
    B --> D{Rows present?}
    D -->|No| E[Empty state]
    D -->|Flat rows| F[Rows]
    D -->|Grouped rows| G[Groups]
    B --> H[Selection banner when rows are selected]

References: experimental/…/ListView.vue• L1-25 experimental/…/ListView.vue• L33-61 experimental/…/ListView.vue• L121-168

Default layout

The default layout renders a header first. It then renders flat rows or groups when data exists. An empty state replaces the row area when the input row set is empty. The selection banner appears only when selection is enabled.

The list owns selection and active-row state. It emits changes for both states and exposes the selection controls for callers that need to coordinate actions outside the default layout.

References: experimental/…/ListView.vue• L8-16 experimental/…/ListView.vue• L65-79 experimental/…/ListView.vue• L171-176

Headers

Column headers

The header turns the column definitions into the visual guide for every row. Each column has a label and key. Its width may be a fixed CSS size or a fractional share of the available space.

The header adds a selection control when rows are selectable. Its column structure matches the row structure so that the header and data stay aligned.

References: experimental/…/ListHeader.vue• L1-24 experimental/…/utils.js• L1-13 experimental/…/Examples.vue• L7-19

Header customization

Header items support content before and after the label. A custom header slot can replace the label, add an icon, or provide a custom resize control. When column resizing is enabled, width changes are reported while the user drags and a save event is reported after a short delay.

References: experimental/…/ListHeaderItem.vue• L1-29 experimental/…/ListHeaderItem.vue• L38-49 experimental/…/ListHeaderItem.vue• L68-94 experimental/…/CustomList.vue• L59-69

Grouping

Grouped data

The list treats the data as grouped when every top-level item has a group label and a row array. In this mode, each group has its own header and row area. A flat input uses the same columns and row behavior without the group layer.

References: experimental/…/ListView.vue• L105-125 experimental/…/ListGroups.vue• L1-15 experimental/…/ListGroupRows.vue• L1-11

Group controls

Each group header can show a custom label and can collapse or expand its rows. A collapsed group keeps its header visible while hiding its row area. A group-specific empty slot can describe a group that has no rows.

References: experimental/…/ListGroupHeader.vue• L1-25 experimental/…/ListGroupHeader.vue• L31-45 experimental/…/ListGroupRows.vue• L1-9 experimental/…/GroupedRows.vue• L130-148

Rows

Row content

Rows use the column key to select each cell value. A cell can display a plain value or an object with a label. Column rules can derive labels and tooltips from the full row, while prefix and suffix content adds context such as an avatar or status marker.

The row-level cell slot receives the column, its value, the row, and the active state. This lets a caller render richer controls without changing how the list manages layout and selection.

References: experimental/…/ListRow.vue• L64-91 experimental/…/ListRowItem.vue• L1-27 experimental/…/ListRowItem.vue• L34-73 experimental/…/CellSlot.vue• L40-64

Row interaction

A row can act as a route link or invoke a row-click callback. The active-row option gives the caller a separate single-row state. Selection remains independent from that active state, and selecting a row clears the active row.

Rows marked disabled do not accept clicks or selection. They remain visible so the list can show records that are not available for the current action.

Selection uses the row key rather than the row object. The header can select every enabled row, and shift-click can select a continuous range across flat or grouped data.

References: experimental/…/ListRow.vue• L16-22 experimental/…/ListRow.vue• L123-174 experimental/…/ListRow.vue• L195-235 experimental/…/ListView.vue• L127-153

Cell alignment

Cell alignment uses a small shared vocabulary. left and start place content at the start, center and middle center it, and right and end place it at the end.

References: experimental/…/utils.js• L15-22 experimental/…/ListRow.vue• L64-73 experimental/…/ListHeaderItem.vue• L1-9

Selection banner

Selection state

The selection banner is transient feedback for a non-empty selection. It shows the number of selected rows and provides a way to select all enabled rows or clear the current selection. Disabled rows do not count toward the all-selected state.

The default selection text is singular for one row and plural for more rows. A caller can supply a selection-text function when the product needs different wording.

References: experimental/…/ListSelectBanner.vue• L10-24 experimental/…/ListSelectBanner.vue• L27-64 experimental/…/ListView.vue• L105-119

Selection actions

The banner exposes the current selection and select-all controls through its default and action slots. Custom actions can use those controls for tasks such as bulk updates while leaving selection ownership with the list.

References: experimental/…/ListSelectBanner.vue• L18-45 experimental/…/ListSelectBanner.vue• L71-85 experimental/…/CustomList.vue• L101-107

Paging summary

ListFooter is a supporting part for lists that load a limited set of records. It can let the caller choose a page length, show the visible count against the total count, and offer a load-more action when both counts are present and the visible count is lower than the total count.

The footer reports page-length changes through its model value and reports load-more requests through a separate event. The caller can replace the whole footer through the default slot or replace its left and right areas through named slots. When no page-length options are supplied, the footer offers 20, 50, and 100 records.

References: experimental/…/ListFooter.vue• L1-27 experimental/…/ListFooter.vue• L30-67 experimental/…/ListView.api.md• L66-112

Empty state

Empty results

The empty state replaces the row area when the list has no rows. Its default content explains that no data is available and can include a button for the next product action, such as creating a record.

Callers can replace the whole empty state through its default slot. The title, description, and button come from the list empty-state option when the default content is used.

References: experimental/…/ListView.vue• L10-15 experimental/…/ListEmptyState.vue• L1-24 experimental/…/Empty.vue• L21-40

Supporting utilities

Layout utilities

The layout utility creates one shared column template for the header and rows. Numeric widths become fractional shares, while string widths remain fixed CSS values. A selectable list reserves an additional column for its checkbox.

The alignment utility maps the supported alignment names to the corresponding layout behavior. Keeping these rules shared prevents the header and rows from drifting apart.

References: experimental/…/utils.js• L1-22 experimental/…/ListHeader.vue• L3-9 experimental/…/ListRow.vue• L36-48

Composable list parts

The list family exports the container and its main parts as separate components. This supports a controlled composition in which a caller keeps the shared list state but replaces headers, rows, cells, or selection actions.

The custom-list example shows this relationship: the container supplies the context, while the caller places the header, row collection, row cells, and selection banner in its own layout.

References: experimental/…/index.ts• L3-25 experimental/…/ListView.vue• L8-16 experimental/…/CustomList.vue• L5-13 experimental/…/CustomList.vue• L59-109

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the header and row column-template rules aligned when changing column widths or selection-column behavior.
  • Preserve the row-key contract when changing selection, grouped rows, or row rendering. The same key identifies rows in links, selection state, and Vue rendering.
  • Keep flat-row and grouped-row selection paths consistent when changing select-all or shift-selection behavior.
  • Keep the ListFooter count contract aligned with the data loader. Its load-more control depends on both counts being present and the visible count being lower than the total count.
  • Keep custom slot payloads aligned with the component that owns them. Custom cells need the row and column context, while selection actions need the selection controls.

Important failure modes

TriggerConsequenceGuard
A row key is missing or not uniqueRows can render with unstable identity and selection can target the wrong record.Supply a stable unique rowKey field for every row.
A grouped data set contains a top-level item without both group and rowsThe list can choose the wrong display mode and flatten the intended structure.Keep all top-level items in the same flat or grouped shape.
A disabled row is included in bulk selectionThe list excludes it from selection and from the all-selected count.Treat disabled as unavailable for bulk actions.
A footer receives zero, missing, or equal row and total countsThe count falls back to 0, and the load-more control does not appear.Update both positive counts when the data source changes.
A custom cell ignores the supplied column valueThe cell can display data from the wrong field or lose row-specific formatting.Use the slot's column, row, and item values together.

Key files

FileWhy to read it
experimental/…/ListView.vueDefines the container, shared state, display-mode choice, and public selection events.
experimental/…/ListHeader.vueShows how columns and the select-all control form the header.
experimental/…/ListRow.vueShows the row contract for cells, links, clicks, disabled rows, and selection.
experimental/…/ListGroups.vueShows how grouped data becomes group headers and group row areas.
experimental/…/ListSelectBanner.vueDefines transient bulk-selection feedback and action slots.
experimental/…/ListFooter.vueDefines the optional page-length, count, load-more, and footer-slot surfaces.
experimental/…/ListEmptyState.vueDefines the no-data display and its product action.
experimental/…/utils.jsDefines the shared column sizing and alignment rules.
experimental/…/CustomList.vueDemonstrates how to compose the exported list parts for custom headers, cells, and actions.