App components / Lists
List
A titled list of rows, in a flat card or plain inside another surface. Each List item has an avatar, icon, checkbox or no lead, a title with an optional detail, then meta in mono and a chevron.
MembersReact · Vue · HTMLFigma: Lists
Code
The component itself, ready to drop into your project. Switch between React, Vue and plain HTML; every version uses the same Tailwind classes on Ochre's tokens.
Members4
Installation
Examples
Leads
Icon, checkbox and no lead.
Settings
Getting started1/3
Recent exports
- Q3 roadmap.csv1,284 rows09:41
- Invoices October.pdfYesterday
- NW-118 audit log.json2 Oct
Sizes and styles
S to XXL, in a card or plain inside another surface.
Members
- Ada Sterlingada@northwind.co2h
- Sam Okaforsam@northwind.co1d
- Maya Shahmaya@northwind.co3d
Motion
Built on Ochre's ease-out curves. With reduced motion switched on, everything still works, it just doesn't move.
01Rows shade on hover and the chevron nudges right.
02Checkbox ticks draw themselves in.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| List title | ReactNode | – | The header line. Leave it out, or set showHeader false, for a bare list. |
| List count / action | ReactNode | – | A mono count beside the title and a control on the right. |
| List variant | "card" | "plain" | "card" | A flat card of its own, or plain inside another surface. |
| List size | "s" | "m" | "l" | "xl" | "xxl" | "m" | Sets the header and every item together. |
| ListItem title / detail / meta | ReactNode | – | Title, a muted line under it, and short mono meta on the right. Long text truncates. |
| ListItem lead | "avatar" | "icon" | "checkbox" | "none" | – | Worked out from avatar, icon or checked when left out. |
| ListItem avatar / icon | { name; src?; status? } / ReactNode | – | The lead itself. |
| ListItem checked / onCheckedChange | boolean / (checked) => void | – | A checkbox lead; the whole row toggles it. |
| ListItem selected | boolean | – | Shaded with a short orange bar at the start, and aria-current. |
| ListItem chevron | boolean | false | For rows that open something. |
| ListItem onClick / href | () => void / string | – | Makes the row a button or a link, with hover and focus. |
| ListItem trailing | ReactNode | – | Anything else at the end: a badge, a switch. |
Usage
Use it for
- Members, settings sections, checklists and recent files: one kind of thing per list.
- S in dense side panels, M on the desktop, L and up for touch.
Avoid
- Several columns of data per row: use a Table.
- Mixing leads in one list: all avatars, all icons or all checkboxes.
- A chevron on rows that don't open anything.