Table atomic components
Compose a table from atomic parts when you need flexibility the table component doesn't provide.
Compose a table from atomic parts when you need flexibility the table component doesn't provide.
The atomic components are for the cases that the standard table can't handle: when you need to control the table’s structure yourself, such as laying out columns on a fixed grid or positioning rows for virtualization. You assemble the table from its parts and keep full control over what each row and cell renders.
If the standard table covers your needs, use it. It is the default for presenting data in rows and columns, and gives you selection, sorting, filtering, pagination, preferences and keyboard navigation with no assembly required.
Use the atomic components only when the standard table can’t meet your needs. For example: a fixed grid column layout, or custom row positioning for virtualization or drag and drop.
The family has six parts, which you nest to build a table:
<TableRoot ariaLabel="Instances">
<TableHead>
<TableRow>
<TableHeaderCell>Name</TableHeaderCell>
<TableHeaderCell>State</TableHeaderCell>
</TableRow>
</TableHead>
<TableBody>
<TableRow>
<TableBodyCell isRowHeader={true}>web-server-01</TableBodyCell>
<TableBodyCell>Running</TableBodyCell>
</TableRow>
</TableBody>
</TableRoot>
Find out more about the individual parts:
To see the parts working together, with sorting, selection, pagination, grid layout and virtualization, see the examples.
How the table atomic components compare with the table component.
Feature | Table | Table atomic components |
|---|---|---|
Content-based column widths | Built in, unless columns are resizable. | Built in, with the auto layout. |
Fixed column widths | Built in. | Built in, with the grid layout. |
Proportional column widths | Not available. | Built in, with the grid layout. |
Minimum and maximum column widths | Built in. | Built in, with the grid layout. |
Column resizing | Built in. | Not yet available. |
Column groups | Built in. | Not yet available. |
Feature | Table | Table atomic components |
|---|---|---|
Sticky header | Built in. | Built in. |
Sticky columns | Built in. | Not yet available. |
Virtualization | Not available. | Use a third-party virtualization library, such as TanStack Virtual, with the positioning styles on the body and rows. |
Feature | Table | Table atomic components |
|---|---|---|
Striped rows | Built in. | Built in, as shaded styling set per row. |
Expandable rows | Built in. | Not yet available. |
Inline editing | Built in. | Not yet available. |
Feature | Table | Table atomic components |
|---|---|---|
Row selection | Built in, for single or multiple selection. | Selected row styling is built in. Compose the selection controls and state. |
Sorting | Built in. | Compose the sort controls and row order. |
Filtering, pagination and preferences | Built in slots for the filter, pagination and preferences components. | Compose the filter, pagination and preferences components alongside the table. |
Loading and empty states | Built in. | Compose them as table rows. |