Skip to content
RivetUI

Data Table

Turns typed records into a sortable, searchable, selectable, and paginated data surface.

@rivetui/data-table

Preview

Explore each composition interactively, then open its code in the same context.

Default

Actions

Production gateway

dpl_8f31c2a

Readyfra128,4102 min ago

Checkout worker

dpl_0c74ae1

Buildingiad19,8428 min ago

Asset transformer

dpl_4b90df7

Readylhr16,20921 min ago

Legacy webhook

dpl_a812e65

Pausedsfo103 hr ago

Billing processor

dpl_b171fe4

Readyfra115,8035 hr ago

8 rows

01 / 02

Empty

Actions

No results

Adjust the active filters or provide a different query.

Loading

Actions
Loading table data

Registry

Installation

Add the component source and its declared dependencies with the shadcn CLI.

Install component
bunx --bun shadcn@latest add @rivetui/data-table
Inspect registry item

Public interface

API reference

Component-specific props are listed here. Native element and Base UI props continue to pass through.

DataTable

PropTypeDefault
columnsDataTableColumnDef<TData>[]—
datareadonly TData[]—
getRowId(row, index, parent?) => stringrow index
rowSelectionDataTableRowSelectionState—
defaultRowSelectionDataTableRowSelectionState{}
onRowSelectionChange(selection: DataTableRowSelectionState) => void—
searchstring | DataTableSearchOptions—
paginationfalse | DataTablePaginationOptions{ pageSize: 10 }
toolbarReactNode | ((table) => ReactNode)—
initialStateDataTableInitialState—
loadingbooleanfalse
loadingRowsnumber5
emptyStateReactNodebuilt-in empty message
tableClassNamestring—
classNamestring—

DataTableSearchOptions

PropTypeDefault
columnIdsreadonly string[]all accessor columns
labelstring"Search table"
placeholderstring"Search rows…"

DataTablePaginationOptions

PropTypeDefault
pageSizenumber10
pageSizeOptionsreadonly number[][10, 20, 50]

DataTableColumnHeader adds the accessible sorting control. Selection remains opt-in through the exported DataTableSelectHeader and DataTableSelectCell helpers.

Selection state is keyed by the value returned from getRowId. Use rowSelection together with onRowSelectionChange for controlled state, or defaultRowSelection when the table should own subsequent updates.

Rivet UI / Data TableComponents engineered, not decorated.