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.
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.
Graduate a flat Table with thousands of rows to DataTable, which windows its rows. VirtualizedList is the single-column list and keeps every row mounted.
| 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.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.