---
title: Resource list
description: Resource list components provide the shared layout for filterable lists.
---

<Component path="resource-list/basic" />

## Anatomy

- `ResourceList` spaces the controls and content.
- `ResourceListHeader` puts the controls on one line.
- `ResourceListSearch` sizes the search input.
- `ResourceListContent` draws the raised list frame. See [Card elevation](/primitives/card#elevation).
- `ResourceListBody` and `ResourceListItem` render a semantic list.
- `ResourceListRow` makes a whole row clickable, with `label` as its accessible name. Pass `expanded` while its panel is open.
- `ResourceListGrid` lays out cards in one, two or three columns.
- `ResourceListTable` draws a list frame with a column header. Each column has an `id`, a `header` and a grid `width`. Pass the pager as `footer`.
- `ResourceListTableRow` puts its cells on the table columns. Pass a `link` element, such as a `<Link>`, to make the whole row a link; `label` sets its accessible name unless the link has its own `aria-label`, and without `label` the link needs text (for example `sr-only`) or an `aria-label`. Pass `onActivate` instead for rows that open a panel; `label` is required then. Pass one or the other, not both.
- `ResourceListFooter` holds the Show more button. Use `variant="bare"` under a grid of cards.
- `ResourceListShowMore` is the Show more button. Pass `loading` while a page loads.
- `ResourceListViewToggle` switches between grid and list views. `useListView` stores the choice in the dashboard.

Keep the resource title and primary action in `PageHeader`.

## Examples

### Clickable rows

<Component path="resource-list/row" />

### Grid and list views

<Component path="resource-list/view-toggle" />

## Best practices

### Header order

Put search first, then filters, then `ResourceListViewToggle`. Give the toggle `md:ml-auto` to push it to the right edge.

### Interactive cells

Give a copy button or other interactive cell in a clickable row the `relative` class, or the row takes its clicks. In a `ResourceListTableRow`, use `relative z-10`.
