Usage
Table is the lightweight, semantic table primitive for presenting structured data you control row-by-row. It prioritizes clarity and accessibility over sorting, filtering, and selection. The mental model is "read-only grid"—a two-dimensional layout where headers and cells are programmatically associated so screen readers can navigate both axes. When the task is "operators interact with this data" (sort, filter, select, paginate), the right component is DataTable; Table stays lean because its job is structure, not behavior. Use it for documentation comparisons, reference matrices, and settings summaries where fewer than a few dozen rows are known up front.
| Incident ID | Priority | Caller |
|---|---|---|
| PSA-24-001 | P1 | Morgan Reyes |
| PSA-24-002 | P2 | Dana Ortiz |
| PSA-24-003 | P3 | Jesse Parks |
On the order of dozens of rows or fewer, where sort and filter are not meaningful. Reference matrices, comparison grids, and settings recaps fit here.
Component prop reference tables, token recipes, feature matrices. The content is authored, not fetched—and the mental model is "read this grid", not "drive this grid".
When none of DataTable's features apply and you only need the accessible HTML structure.
Sort, filter, search, pagination, row selection, row expansion, async loading, column resizing. Use DataTable. Re-implementing those on top of Table is expensive and error-prone.
Tables with column counts that don't fit narrow viewports need a different presentation on mobile. Design an alternate card layout or switch to a definition-list pattern; Table alone is not the right vehicle.
Virtualize the data with VirtualizedList or graduate to DataTable. A flat Table with thousands of rows will crater layout performance.
| Concern | Purpose | Emphasis |
|---|---|---|
| Column headers vs. data cells | Semantics | Always use proper header cells for columns |
| Row headers | Row identity | First cell as row header when it names the row |
| Alignment | Readability | Text left, numerics right, status icons centered |
| Scrollable wrapper | Overflow | Pair with Scrollable for wide or tall tables |
| Density | Spacing | Default for most content; tighter density for reference matrices |
Table contains TableHeader, TableBody, TableRow, and TableCell variants. Headers establish relationships for assistive technology; row headers let screen reader users navigate two-dimensional data. Keep the markup semantic—do not flatten a table into divs for styling convenience.
Text tokens for emphasis rather than ad-hoc styles.Interactable or row-level buttons with clear semantics. Avoid nesting conflicting controls.DataTable.Do
Don't
Table because the layout "looks grid-like" for non-tabular content. Use CSS Grid or FlexBox.Table, open a modal or drawer for the editing surface.Native table semantics carry most of the load: headers associate with cells, reading order matches visual order. The app owns column and row header scope, caption or labelled-by when the table needs explanation, and reading-order checks for any rearranged visual layout. See Accessibility for the full contract and testing notes.
On this page