Skip to content
TrademarkTrademark
Docs
Components

Table

Updated: October 20, 2026
View on GitHub
Soon
Not released yet. The published package does not include this yet, so it will not install today.

Table takes the same props as on the web: data (headers and rows), searchable, sortable columns, onRowClick, row actions, striped, compact, loading, emptyState and paginated. On a phone, drop the columns that matter least with a header's hide, as on the web. See the web Table for the same component in the browser.

A guest list with search, sortable columns, tier tags, row actions and pages

Basic usage

Cells are text or any element. Numbers in text sort as numbers, so "12" comes after "9".

Column widths

A header's width is "120px" for a fixed column or "30%" for a share; columns without one share what is left. align lines a column up left, centre or right.

Scrolling

maxHeight scrolls the rows inside that many points; stickyHeader keeps the header in view while they scroll. Without maxHeight the table is as tall as its rows, for a screen that already scrolls.

Differences from the web

  • Pressed, not hover. hoverable highlights a row while it is pressed.
  • No class names. rowClassName and cellClassName are left out.
  • maxHeight is a number of points rather than a CSS length.

API reference

Prop
Type
Default
Description
data{ headers: TableHeader[]; rows: ReactNode[][] }The table. Required.
searchablebooleanfalseA search field over the rows.
searchPlaceholderstring"Search..."The search field's label.
onRowClick(rowIndex: number) => voidCalled with the tapped row's index in rows.
actionsTableAction[]Icon buttons at the end of each row.
stripedbooleanfalseTints every other row.
hoverablebooleantrueHighlights a row while pressed.
compactbooleanfalseTighter cells.
loadingbooleanfalseShows skeleton lines, or loadingState.
emptyStateReactNode"No results"Shown when there are no rows.
paginatedbooleanfalsePages the rows with a Pagination under the table.
defaultPageSizenumber10Rows per page.
pageSizeOptionsnumber[][5, 10, 20, 50]Page sizes to pick from.
maxHeightnumberScrolls the rows inside this height.
stickyHeaderbooleanfalseKeeps the header in view while the rows scroll.

TableHeader

Field
Type
Description
contentReactNodeThe header.
keystringThe column's key, for sorting.
sortablebooleanA tap sorts by this column, then reverses it.
widthstring"120px" or "30%".
align"left" | "center" | "right"The column's alignment.
hide{ xl?, l?, m?, s?, xs?: boolean }Hides the column at a breakpoint and below.

TableAction

Field
Type
Description
iconIconNameThe button's icon.
labelstringIts spoken name.
variant"primary" | "secondary" | "tertiary" | "danger"Defaults to "tertiary".
onClick(rowIndex: number) => voidCalled with the row's index.
disabled(rowIndex: number) => booleanDisables it for some rows.
Edit this page on GitHub