v0.3.1 StableFoundation ComponentReact 18 & 19Zero Runtime CSS

DataTable

A semantic table with filtering, sorting and pagination.

Interactive preview

0 selected
Project directory
Orbit workspace12
Field notes4

4 records

Usage

import { DataTable } from "@devvy-ui/react";

<DataTable label="Projects" rows={rows} columns={columns} getRowId={row => row.id} filterText={row => row.name} />

API reference

Native HTML attributes, className, style and a forwarded ref are supported. Component-specific props:

PropTypeDefaultDescription
rows / columnsT[] / DataColumn<T>[]requiredRecords and typed cell renderers.
getRowId(row: T) => stringrequiredStable identity.
filterText(row: T) => string—Enables text filtering.
pageSizenumber10Visible records per page.
rowSelectionDataTableSelection<T>—Workspace addition: getRowLabel, selectedIds/defaultSelectedIds, onSelectedIdsChange, isRowSelectable and renderActions(rows, clear). Omit for the existing table behavior.

Accessibility & behavior

Platform Behavior & Guidelines

Typed renderers preserve native table structure. Sortable columns supply sortValue; row ids must be stable. Filtering and pagination remain client side; use bounded datasets. Optional rowSelection is available since npm 0.3.0. Select-all affects eligible rows on the current page; selection persists across filtering and pages. Bulk actions receive only existing, selectable rows.

Source ownership

Run npx @devvy-ui/cli init once in your React project, then add the source:

npx @devvy-ui/cli add data-table

Make the source yours.

Start from the canonical implementation used by the package and registry. Change the code, keep the MIT notice, and build the behavior your project needs.

DataTable.tsxREACT / TSX

Edit your own copy. Downloaded source uses your changes; the component preview above uses the shipped version. Run the source installer first to include shared helpers.