Skip to content
Design System
GitHub

Responsive table

v0.72.0, changelog

The same rows as a Table where there is room and as a grouped list under 36rem of its own width, from one list of columns, rendering only one so the semantics fit.

API reference

Generated from the types. Every part also takes className.

ResponsiveTable

rowsrequired
readonly T[]
columnsrequired
readonly ResponsiveTableColumn<T>[]
rowKeyrequired
(row: T) => KeyA stable key for each row.
labelrequired
stringNames the table, and the list on a phone, for screen readers ("Robots").
onRowClick
(row: T) => voidOpens a row: the title cell becomes a button in the table, the whole row a button with a chevron on a phone.
rowActions
(row: T) => ReactNodeA row's ⋯ menu or one or two icon buttons (DropdownMenuMoreTrigger with the row's name): the table's last cell, the end of a phone row.
empty
ReactNodeWhat shows when there are no rows: an EmptyState with size="inline".
layout
"table" | "list" | "auto" = "auto"auto measures its own width; table or list fixes the layout (a side panel that is always narrow).
bare
booleanInside a surface (a card, a panel): the table and the list draw no edge of their own, so edges never nest.
stickyFirstColumn
booleanThe table's first column stays put while it scrolls sideways (Table's stickyFirstColumn); the list has no columns.
labels
Partial<ResponsiveTableLabels>The words it says, to translate them.