Data display
List
Rows of simple records (people, files, settings). Use Table when users compare columns.
size: 'sm'for dense lists (4px × 8px padding, 24px avatar). Default rows are 6px × 12px with a 32px avatar.selectablemakes it a listbox: click or ↑ ↓ Home End, Enter/Space selects and callsonSelect(id). Passlabel.- Titles and descriptions wrap;
metastays on one line.
When to use
Simple records with a title, description and one action: people, files, settings.
Use something else
Comparing values across columns → Table. Status workflow → Kanban.
Do
- Use
selectablewithonSelectfor master–detail layouts. - Use
size="sm"in side panels.
Don't
- Don't put more than one action per row; use a MenuButton.
Props
| Prop | Type |
|---|---|
items required | Array<{ id?: string; title: string; description?: string; meta?: string; icon?: string; avatar?: string; selected?: boolean; action?: React.ReactNode }> |
bordered | boolean |
selectable | boolean |
size | 'sm' | 'md' |
onSelect | (id: string | number) => void; label?: string; className?: string |
Use
const { List } = window.Tessera;
const el = React.createElement(List, { /* props */ });