Data
Table
Clean, compact and sticky-header tables.
Invoices
A native table with a calm header, hairline rows and right-aligned, tabular figures. It is a Server Component, so it adds no JavaScript.
| Invoice | Customer | Status | Due | Amount |
|---|---|---|---|---|
| INV-3041 | Northwind Traders | Paid | Nov 3, 2025 | $4,250.00 |
| INV-3042 | Harbor & Pine | Pending | Nov 18, 2025 | $1,840.50 |
| INV-3043 | Lumen Analytics | Paid | Nov 21, 2025 | $12,600.00 |
| INV-3044 | Fieldstone Studio | Overdue | Oct 29, 2025 | $760.00 |
| INV-3045 | Cobalt Logistics | Pending | Dec 2, 2025 | $3,195.25 |
| Total | $22,645.75 | |||
When to use
- Comparing the same attributes across many records: invoices, members, deployments.
- Need sorting, search, selection or pagination? Use
DataTable, which is built on this.
Not for layout, and not for a handful of key / value pairs (use a description list).
Variants
compact tightens rows to 36px, striped tints alternate rows, bordered adds column hairlines, and stickyHeader with a maxHeight pins the header while the body scrolls. One row is marked selected.
| Region | Orders | Revenue | Growth |
|---|---|---|---|
| Northern Europe | 1,200 | €18,400 | −4.0% |
| Iberia | 2,137 | €26,319 | −0.3% |
| DACH | 3,074 | €34,238 | +3.4% |
| Benelux | 4,011 | €42,157 | +7.1% |
| UK & Ireland | 4,948 | €50,076 | +10.8% |
| Nordics | 1,785 | €57,995 | −3.5% |
| Baltics | 2,722 | €65,914 | +0.2% |
| Italy | 3,659 | €73,833 | +3.9% |
| France | 4,596 | €81,752 | +7.6% |
| Poland | 1,433 | €89,671 | +11.3% |
| Czechia | 2,370 | €97,590 | −3.0% |
| Greece | 3,307 | €105,509 | +0.7% |
API
Table
| Prop | Type | Default | Description |
|---|---|---|---|
| striped | boolean | false | Tint alternate body rows. |
| compact | boolean | false | 36px rows instead of 48px. |
| bordered | boolean | false | Hairline between columns. |
| stickyHeader | boolean | false | Pin the header row; pair with maxHeight. |
| maxHeight | number | string | — | Height at which the body scrolls (number is px). |
| label | string | — | Names the scroll region for screen readers. |
| wrapperClassName | string | — | Class for the bordered wrapper. |
TableRow, TableHead, TableCell
| Prop | Type | Default | Description |
|---|---|---|---|
| selected | boolean | — | TableRow: tints the row (data-state="selected"). |
| numeric | boolean | — | TableHead / TableCell: right-align with tabular figures. |
| align | 'left' | 'center' | 'right' | — | TableHead / TableCell: text alignment. |
Also: TableHeader, TableBody, TableFooter and TableCaption map to their HTML elements and forward every prop.
Accessibility
- Native table, row and cell semantics; header cells carry scope="col".
- The scroll wrapper is focusable so keyboard users can scroll wide tables; give it a name with label.
- Keep a caption or label so the table has an accessible name.
Motion
- Row hover and selection change colour in 150ms. Hover tints apply only to fine pointers.