Table
A table displays structured data in rows and columns, enabling users to scan, compare, and interact with information efficiently.
For proper application, the Table component can be used for different purposes to enable easier and consistent display of structured data across digital experiences.
Do
- Use tables for homogeneous data sets with three or more columns.
- Add a caption or
aria-labelfor assistive technologies. - Use
size="small"for dense data-heavy views like log tables. - Wrap the table in
TableContainerto enable horizontal scrolling on narrow viewports. - Use
TablePaginationwhen row count exceeds 25 with page sizes[10, 25, 50]. - Place inline row actions in the last column, right-aligned, using
IconButtonwith a descriptivearia-label. - Always confirm destructive actions like delete before execution.
Don't
- Use tables purely for layout alignment of unrelated content.
- Mix unrelated data types across rows.
- Omit column headers — every table must have a
TableHead. - Hard-code hex colour values — always use Sistent theme tokens.
- Rely on colour alone to convey row status; supplement with text or icons.
Row Density
Sistent exposes a size prop on the Table component:
- Use
size="medium"(default) for general-purpose tables with comfortable vertical spacing. - Use
size="small"for dense data-heavy views where vertical space is at a premium, such as log tables or comparison matrices.
Row Selection
- Place a
Checkboxin the first cell of each row and in the header row for select-all behaviour. - Update the row background to
theme.palette.action.selectedon selection. - Show a selected-row count in a toolbar above the table.
- A single click on the checkbox should toggle selection.
Empty and Loading States
- Empty: Display a single full-width
TableCellspanning all columns with a brief message and call-to-action. - Loading: Replace body rows with skeleton rows or a centered
CircularProgressinside a spanning cell.