★ GitHub
Component

DataTable

Robust data table with sorting, selection, pagination, and custom rendering.

Basic Usage

IDUser NameRole
1AliceAdmin
2BobEditor
3CharlieViewer
4DianaEditor
Sortable, selectable, and striped table
tsx
const columns = [ { key: "name", label: "Name", sortable: true }, { key: "role", label: "Role" }, ]; <DataTable columns={columns} data={data} selectable striped />

Pagination

IDUser NameRole
1AliceAdmin
2BobEditor
Page 1 of 2 · 4 rows
Client-side pagination
tsx
<DataTable columns={columns} data={data} pageSize={2} />

Props

PropTypeDefaultDescription
columns *DataTableColumn[]—Column definitions (key, label, sortable, render, width).
data *T[]—Array of data rows.
rowKeystring'id'Property name for unique row keys.
selectablebooleanfalseEnables row selection via checkboxes.
stripedbooleanfalseAdds alternating striped background to rows.
pageSizenumber—Enables client-side pagination with the given page size.