zynactradocs

List page

The page around a table: search, filters, result count, loading, empty, no-results and error states, and paging.

The Data table pattern covers the table itself. This one is everything around it: the header with the primary action, search with Input Group, a status filter with Select, and the four states every list has, using Skeleton, Empty and Alert. Use the demo-state buttons to see each one.

Demo state:

Services

6 services
NameStatusRegion
payroll-apiRunningap-south
leave-workerRunningap-south
hris-webRunningeu-west
reports-cronStoppedeu-west
Page 1 of 2

How it works

StateWhenShows
LoadingThe first fetchThe table header and Skeleton rows: same count and height as a page, so nothing jumps
No dataThe list is empty and no filter is onEmpty with an icon, what this list is for, and the primary action. The filters are hidden: there's nothing to filter
No resultsFilters matched nothingEmpty inside the table, saying what didn't match, with Clear filters
ErrorThe fetch failedA destructive Alert saying what failed and that nothing is lost, with Retry
  • No data and no results are different screens. One invites the first action, the other helps undo a filter. Mixing them up tells a new user to "clear filters" they never set.
  • The result count says "2 of 6 services" when filtered and "6 services" when not, with role="status" so screen readers announce changes.
  • Any change to search or filter goes back to page 1. Paging hides when there's only one page.
  • aria-busy on the table body while loading.

Guidelines

  • One brand button per view. In the no-data state the primary action moves from the header into the Empty, so there's still only one.
  • Keep search, filters and page in the URL (?q=pay&status=running&page=2) once the data comes from a server, so a filtered view can be shared and survives a reload.
  • Errors say what failed and what still works ("Your services are still running"). Never show a raw status code alone.
  • Don't use a spinner for a list. Skeleton rows show the shape of what's coming.
Edit on GitHub

On this page