Skip to content
Alea0.1

Data display

ListView

A list of rich items to select, open or act on.

Ant Design: List

import { ListView, ListItem } from '@alea/ui';

Examples

ListView

Rich items with a start, description and end.

Ada Lovelaceada@example.comOwner
Grace Hoppergrace@example.comEditor
Alan Turingalan@example.comViewer

Separated, with actions

Items as cards; onAction opens one.

tokens.json12 KB · today
tokens.css8 KB · yesterday

Props

ListView props

A list of rich items people can select, open or act on, with keyboard navigation (Ant's List).

PropTypeDefaultDescription
variant"separated" | "joined"'joined'Lines between items (joined) or separate cards.

ListItem props

One item of a ListView.

PropTypeDefaultDescription
descriptionReactNode-A second line.
endReactNode-Actions or meta on the right (buttons stay reachable with Tab and arrows).
startReactNode-An avatar, icon or image on the left.

Accessibility

  • A grid list: arrows move between items and into their buttons.

Keyboard

KeyDoes
Arrow Up / DownMove between items
SpaceSelects
EnterOpens (onAction)

Do and don't

Do

  • Use separated for cards, joined for dense lists.
  • Give the list an aria-label.

Don't

  • Don't nest interactive controls deeper than one level in an item.
  • Don't use ListView for tabular data: use Table.
Tested with axe, keyboard and screen reader roles