Examples
Examples of tables composed with the table atomic components.
Examples of tables composed with the table atomic components.
With the table atomic components, you compose sorting, selection, filtering and pagination yourself. This example shows one way to do it, using the collection hooks to manage the items and the atomic components to render the table, including its loading, empty and no-match states.
Instance ID | State | Availability zone | ||||
|---|---|---|---|---|---|---|
web-server-01 | i-1a2b3c4d | t3.micro | Running | us-east-1a | 2026-01-01 | |
web-server-02 | i-1a2b5b3c | c5.xlarge | Pending | us-east-1a | 2026-01-12 | |
web-server-03 | i-1a2b7a2b | m5.large | Stopped | us-east-1a | 2026-01-23 | |
web-server-04 | i-1a2b991a | t3.small | Running | us-east-1b | 2026-02-03 | |
web-server-05 | i-1a2bb809 | t3.micro | Pending | us-east-1b | 2026-02-14 | |
web-server-06 | i-1a2bd6f8 | c5.xlarge | Stopped | us-east-1b | 2026-02-25 | |
web-server-07 | i-1a2bf5e7 | m5.large | Running | us-west-2a | 2026-03-08 | |
web-server-08 | i-1a2c14d6 | t3.small | Pending | us-west-2a | 2026-03-19 | |
web-server-09 | i-1a2c33c5 | t3.micro | Stopped | us-west-2a | 2026-03-30 | |
web-server-10 | i-1a2c52b4 | c5.xlarge | Running | eu-west-1c | 2026-04-10 |
In grid layout, table root renders the table as a CSS grid, and you set the width of each column up front. A column can have a fixed width, share the remaining space with other columns by weight, or grow up to a maximum width, and flexible columns can also have a minimum width. Use this playground to try each kind of column, and switch the container width to see minimum widths make the table scroll horizontally instead of squeezing its columns.
columnLayout={{ type: 'grid', columns: [{"size":{"flex":2},"minWidth":160},{"size":{"flex":1},"minWidth":120},{"size":120},{"minWidth":100,"maxWidth":200}] }}Name | Type | Size | Status |
|---|---|---|---|
analytics-pipeline-primary | Stream | 12 GB | Active |
customer-records | Database | 840 GB | Active |
image-thumbnails | Bucket | 3.1 TB | Archived |
nightly-report-job | Function | 45 MB | Disabled |
session-cache | Cache | 6 GB | Active |
web-frontend-assets | Bucket | 210 GB | Pending deletion |
The table atomic components don't virtualize rows themselves, but they expose the properties a virtualization library needs. Table body and table row take a position style for placing rows, and the row count on table root and row index on table row let assistive technologies announce every row, not only the rendered ones. This example connects them to TanStack Virtual to render 10,000 rows in a scroll container with a sticky header. For a table that scrolls with the page, use TanStack's window virtualizer instead.
Name | Category | Price | Stock | Rating |
|---|
Name | Category | Price | Stock | Rating |
|---|