Content & Data
Table
Table is a native HTML table foundation with captions, headers, body rows, footers, cell alignment, responsive overflow, RTL support, print-friendly scrolling, and composition patterns for empty/loading/error — not the interactive Data Table pattern (no sorting, selection, or pagination).
Compound semantic foundation — no density/sort/selection variants in Beta
- React last updated
- 2026-08-14
- Documentation last updated
- 2026-08-31
- Accessibility target
- WCAG 2.2 AA (target)
- Version
- 0.1.1-beta
Known open questions
- Canonical Caption and Footer visual treatments are still pending in Figma; React preserves its semantic caption/footer API without claiming visual parity for those parts.
- Stable-v1 Table is intentionally Rounded-only at radius/lg (12px), with Figma cornerSmoothing=0 and no Shape property. Controlled Table Shape mapping is deferred; global Sharp/Pill/Squircle contexts do not alter the shell.
- The responsive TableScrollArea edge-fade treatment remains React-only; Figma documents horizontal overflow as composition rather than native Table anatomy.
- Table presentation QA remains separate: budget/date wrapping, column presentation, Pagination number visibility, Table/Pagination spacing, and interactive-cell alignment are still open.
- Data Table (implemented 2026-07-15) composes Table for the narrow MVP scope approved 2026-07-13 — sorting only, external Pagination; selection, sticky headers, and density remain excluded from v1.
Purpose
Anatomy
Variants and states
When to use
When not to use
Accessibility
Keyboard behavior
Common mistakes
Properties
What is the difference between Table and Data Table?
Why does Table use native HTML?
Does Table use role="grid"?
When should a table include a caption?
How should row headers be marked?
Can cells contain buttons and links?
How does Table work on mobile?
Does Table support sorting?
Does Table support row selection?
When should a true ARIA Grid be used?
Tokens used
Known limitation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
| layout | "auto" | "fixed" | "auto" | Table layout algorithm. |
| TableCaption.visibility | "visible" | "screen-reader" | "visible" | Caption visibility while remaining accessible. |
| TableHead.align / TableCell.align | "start" | "center" | "end" | "start" | Logical text alignment via CSS — not HTML align. |
| TableScrollArea.accessibleLabel | string | — | Names the overflow region when horizontal scrolling needs a landmark. Keep distinct from the caption. |
| TableScrollArea.tabIndex | number | — | Consumer-controlled. Recommend 0 for known horizontally scrollable tables; omit when the table fits. |
| data-table-wrap | "nowrap" | — | Optional attribute on TableHead/TableCell to prevent wrapping (action columns). |
React example
import {
Table,
TableBody,
TableCaption,
TableCell,
TableHead,
TableHeader,
TableRow,
TableScrollArea,
} from "@/components/ui/Table";
export function Example() {
return (
<TableScrollArea accessibleLabel="Scrollable projects table" tabIndex={0}>
<Table>
<TableCaption>Active projects</TableCaption>
<TableHeader>
<TableRow>
<TableHead scope="col">Project</TableHead>
<TableHead scope="col" align="end">
Budget
</TableHead>
</TableRow>
</TableHeader>
<TableBody>
<TableRow>
<TableHead scope="row">Atlas</TableHead>
<TableCell align="end">$24,000</TableCell>
</TableRow>
</TableBody>
</Table>
</TableScrollArea>
);
}Related components
- List Item — single-column rows, not multi-column tables
- Badge — status metadata inside cells
- Link — navigational cell content
- Menu — row actions inside cells
- Checkbox — selection controls inside cells (composition only)
- Empty State — compose manually when a table has no rows
- Skeleton — loading placeholder rows
- Alert — error messaging above or beside tables
- Pagination — external composition for paged data