Pulse
Pulse

Components

Table

Codifies the row/header pattern already used across every props table on this site. Click-to-sort, row selection, and pagination are all opt-in.

Playground

Updated
billing-apiDeployedA. Reyes2 min ago
auth-serviceDegradedJ. Kim18 min ago
reporting-workerFailedS. Patel1 hr ago
notificationsQueuedA. Reyes3 hr ago

Selectable

Sorting

Updated
billing-apiDeployedA. Reyes2 min ago
auth-serviceDegradedJ. Kim18 min ago
reporting-workerFailedS. Patel1 hr ago
notificationsQueuedA. Reyes3 hr ago

Service, Status, and Owner are sortable — click a header to sort ascending, click again for descending, a third click clears it. The Status column sorts by its label text via sortValue, since its cell renders a Badge, not plain text.

Selection

Updated
billing-apiDeployedA. Reyes2 min ago
auth-serviceDegradedJ. Kim18 min ago
reporting-workerFailedS. Patel1 hr ago
notificationsQueuedA. Reyes3 hr ago

1 of 4 selected. The header checkbox shows indeterminate when only some rows are checked.

Pagination

Updated
billing-apiDeployedA. Reyes2 min ago
auth-serviceDegradedJ. Kim18 min ago
reporting-workerFailedS. Patel1 hr ago
notificationsQueuedA. Reyes3 hr ago

1–4 of 9

pageSize=4 against 9 rows — self-contained internal page state, same pattern as sorting. Combine with sortable columns freely; changing sort resets back to page 1.

Props

PropTypeDefaultDescription
columnsTableColumn<Row>[]—{ key, label, render?(row), sortable?, sortValue?(row) } — render is optional; omit to print row[key] directly.
rowsRow[]—Array of plain data objects.
getRowKey(row: Row) => string—Stable unique key per row, same as a React list key.
selectablebooleanfalseAdds a checkbox column. Requires selectedKeys/onSelectionChange to actually do anything (controlled, same pattern as Switch).
selectedKeysstring[]—Currently-selected row keys.
onSelectionChange(keys: string[]) => void—Called with the full next selection whenever a row or the header checkbox is toggled.
onRowClick(row: Row) => void—Makes rows clickable (e.g. navigate to a detail view). Doesn't fire when clicking the selection checkbox.
pageSizenumber—Opt-in pagination — self-contained internal page state, same pattern as sorting. Omit to render every row.

Usage Guidelines

When to use

  • Use for structured, multi-column, row-based data where users compare values across a column.
  • Use sortable + sortValue when a column's cell renders something other than plain text (a Badge, a formatted date) so sorting still works on the underlying value.
  • Use pageSize once a dataset regularly exceeds a screenful of rows — it's self-contained, no extra state to wire up.

When not to use

  • Don't use Table for a simple list of one attribute per item — a plain list is lighter.
  • Don't combine pageSize with a dataset the user needs to scan/compare in full — pagination hides rows, which works against that.

Usage