Skip to content

Entity list element ​

The list of records a query returns, shown as a list, a grid of cards or a table.

library-viewmodes-viewmodeslist--defaultOpen in Storybook ↗

When to use ​

  • Any set of records that comes from a query: the main library, the relations in a detail panel, search results.
  • People need to scan, sort, select or open records.

When not to use ​

  • Fields of one record: use label and value rows in a panel.
  • Choosing records for a field: use the entity picker, which shows this list inside a modal.

Anatomy ​

  1. Results band: --color-surface-panel-header, --list-band-pad, with a hairline below. It holds the count chip, the pager, page size, sort, search and the view switch, and wraps when narrow.
  2. Count chip: 1,258 results, bold, on --color-surface (--radius-chip, --chip-padding, --text-chip). Above the count limit it reads 1,000+ results and is a button that loads the exact count.
  3. View switch: picks the list, grid, table or another mode; see view modes.
  4. Selection bar: the selection action bar, on its own row.
  5. Column header row: labels in --text-label, bold, --color-text-field-label, --list-header-height high, with a Select page checkbox and Actions on the right. It stays on top while the list scrolls.
  6. Row: a checkbox, a thumbnail, the fields and the row actions; --list-row-pad, --text-table, a --color-border-faint hairline below. In list and grid mode the first field is the title: bold, --color-text-link, with a dashed underline in --color-border-dashed; the other values are in --color-text-secondary.
  7. Preview eye (optional): opens the preview panel for that row.
library-resultcountchip--statesOpen in Storybook ↗

Variants ​

Which variant opens, and how people switch, is on the view modes page.

VariantLayoutWhere
Listone row per record, fields side by sidedefault for most lists
Gridcards with square media on top, title and fields belowmedia-heavy lists
Grid, compactcards with media and title only, in narrower columnsscanning many images
Tablefixed columns under a header row; can be grouped by a fieldcomparing values across records
library-viewmodes-viewmodeslist--gridOpen in Storybook ↗
library-viewmodes-viewmodestable--defaultOpen in Storybook ↗
  • List shows the column header row only when every row on the page has the same fields; otherwise each value keeps its own label.

  • Grid cards are at least --grid-card-min-width wide (compact: --grid-card-min-width-compact), --grid-gap apart, with a --color-border-subtle border, --radius-card corners and no shadow. A card without an image shows the file-type icon on --color-surface-muted. The checkbox sits on the image's top-left corner. Titles wrap to two lines, other values wrap to two lines and then cut off; the full value is in a tooltip.

  • Small screens (below 48rem) get two control rows: search, then filters, one sort button and the view switch. Sort options open as a bottom sheet. The column header row is replaced by a row with Select page, the count and the selection actions.

States ​

StateWhat you seeTrigger
Restingwhite row, hairline below—
Hover--color-surface-row-hover fill; text keeps its colour, no underlinepointer
Selected--color-accent-wash and --shadow-accent-row; in a grid, the wash and a --color-accent bordercheckbox
Preview opena --list-row-preview-border accent border on the left, no wash; the eye is pressed (grid: accent border)the row's eye
Last previewedthe same left border, eye not pressedthe preview closed, if the list keeps the last row marked
Newa small accent dot before the row, text in semiboldrecord added since the last visit
Seenthe title in --color-text-secondaryrecord visited before, if the list tracks seen records
Disabledgrey row, no checkbox, not clickablerecord not available here
Loadingskeleton rows on the first load; rows pulse while a new page loadsfetching
EmptyNo results found, or No results match your filters with a tipno records
library-viewmodes-listitem--statesOpen in Storybook ↗

A table row shows the same states:

library-viewmodes-tableviewrow--statesOpen in Storybook ↗

The checkbox owns the wash and the open preview owns the left border, so a row can show both without one hiding the other.

Keyboard & accessibility ​

  • Tab reaches each row's link (when the list opens records), its checkbox, the preview eye and the row actions, in that order. In a grid card the order is checkbox, title, eye, actions. Space toggles a checkbox; Enter on a link opens the record.
  • The count chip sits in a role="status" region, so a new total is announced.
  • The view switch is described on the view modes page.
  • The Select page checkbox ticks when the whole page is selected, shows a partial state when some rows are, and clears the page when unticked.
  • The column header row is hidden from screen readers; each value keeps its label for them, visually hidden.
  • The preview eye is a toggle button named Open preview or Close preview.
  • A grid card's image has the record's title as its alt text.

Content ​

  • Column labels are short nouns in sentence case: Title, Author.
  • The first field is the title; keep it the field people recognise a record by.
  • Translation keys: library.result-count, library.view-modes.*, library.grid-size.*, search.noresult, search.noresult-nofilters, search.tip.

View modes · Selection action bar · Preview panel · Pagination · Checkbox · Filter panel

Powered by Elody - Open Source Semantic Data Platform