Data display
Table
Align data in rows and columns so readers can compare values.
Anatomy
- Column heading
- Data cell
- Status cell
- Row divider
Configuration
Sorting
| Project | Status | Open tasks |
|---|---|---|
| Homepage | Live | 4 |
| Checkout | In review | 12 |
| Dashboard | Draft | 2 |
Use when a fixed order is helpful, such as a curated list of projects.
| Checkout | In review | 12 |
| Dashboard | Draft | 2 |
| Homepage | Live | 4 |
Select a column header to sort the rows or reverse the sort order.
Design tokens used
| Category | Token | Value | Where it’s used |
|---|---|---|---|
| Colour | --cc-foreground | — | First column and active or hovered sort labels |
--cc-muted-foreground | — | Other cells, inactive headers, and neutral status text | |
--cc-surface | — | Table body background | |
--cc-surface-muted | — | Column header and neutral status backgrounds | |
--cc-border | — | Table outline and row dividers | |
--cc-success-soft | — | Live status badge background | |
--cc-success-soft-foreground | — | Live status text | |
--cc-warning-soft | — | In-review badge background | |
--cc-warning-soft-foreground | — | In-review status text | |
--cc-focus-ring | — | Keyboard focus ring |