Components
Table
Semantic <table> primitive, wrapped in a horizontally scrollable container
so wide tables overflow rather than break layout. Compose with the exported
TableHeader, TableBody, TableRow, TableHead, TableCell,
TableFooter, and TableCaption parts.
Usage
Best practices
Use
Tablefor a small, static, hand-authored table; reach forDataGridonce you need sorting, filtering, pagination, column pinning/visibility, or row virtualisation -Tablehas no data model.Include a
TableCaptiondescribing the table's contents - it is the accessible name screen readers announce for the<table>.Compose real
TableHeader/TableBody/TableRow/TableHead/TableCellparts (semanticthead/tbody/th/td); don't fake rows with styled divs or you lose the table semantics.
Props
Also exports
- component
Table - component
TableBody - component
TableCaption - component
TableCell - component
TableFooter - component
TableHead - component
TableHeader - component
TableRow