Data Table

Toolbar + sortable, selectable table + pagination. Cells are ReactNode — Badge/Avatar/FontAwesomeIcon compose freely.

View in Figma
NameAssigneePriorityStatusUpdated
Lobby HVACAGAshley GreenMediumFinalized2h ago
Warehouse doorOBOllie BrooksHighIn progress1d ago
Loading dock lightMGMitch GalehouseLowPending3d ago
Showing 1–3 of 3
1
rows per page
<div className="flex flex-col gap-sm">
  <Toolbar searchPlaceholder="Search requests…">
    <IconButton
      icon={faDownload}
      type="ghost"
      size="sm"
      aria-label="Export"
    />
    <IconButton
      icon={faTableColumns}
      type="ghost"
      size="sm"
      aria-label="Columns"
    />
  </Toolbar>
  <DataTable
    selectable
    rowActions={(id) => {/* … */}}
    sortKey="name"
    sortDirection="asc"
    columns={columns}
    rows={rows}
    footer={
      <DataTablePagination
        total={3}
        page={1}
        pageSize={20}
      />
    }
  />
</div>
NameBuildingUpdated
Asset 1Building A1d ago
Asset 2Building B2d ago
Asset 3Building C3d ago
Asset 4Building D4d ago
Asset 5Building A5d ago
Asset 6Building B6d ago
Asset 7Building C7d ago
Asset 8Building D8d ago
Asset 9Building A9d ago
Asset 10Building B10d ago
Asset 11Building C11d ago
Asset 12Building D12d ago
Asset 13Building A13d ago
Asset 14Building B14d ago
Asset 15Building C15d ago
Asset 16Building D16d ago
Asset 17Building A17d ago
Asset 18Building B18d ago
Asset 19Building C19d ago
Asset 20Building D20d ago
Asset 21Building A21d ago
Asset 22Building B22d ago
Asset 23Building C23d ago
Asset 24Building D24d ago
Asset 25Building A25d ago
Showing 1–25 of 25
1
rows per page
<div className="flex h-[360px] flex-col">
  <DataTable
    fillHeight
    className="flex-1"
    selectable
    columns={columns}
    rows={rows}
    footer={
      <DataTablePagination
        total={25}
        page={1}
        pageSize={50}
      />
    }
  />
</div>
Props
columns:DataTableColumn[]
{ key, header, align?, sortable? } definitions.
rows:DataTableRow[]
{ id, cells, muted? } — cells keyed by column, each a ReactNode.
selectable:boolean= false
Leading select-all / per-row checkboxes.
rowActions:(rowId: string) => void
Trailing … overflow per row. Called with row id on activation.
sortKey / sortDirection:string / "asc" | "desc"
Presentational sort indicator.
selectedIds / onSelectionChange:string[] / fn
Controlled selection.
footer / stickyFooter:ReactNode / boolean= — / false
Footer slot (e.g. <DataTablePagination>). stickyFooter pins it to the scroll-area bottom while a long page-scrolled table scrolls; ignored when fillHeight is set.
fillHeight:boolean= false
Card fills a height-constrained flex parent; rows scroll inside the card under a sticky header and the footer is always visible. Pass className="flex-1" and own the page's bottom gap. Overrides stickyFooter.
Tokens