DataTable
ProSemantic records table with sortable column headers, row selection, bulk and row actions, toolbar and filter slots, and built-in loading, empty, and error states.
Pro component. DataTable is a paid component. It ships in @lusterui/react-pro, a .tgz you download from the site after purchase.
Usage
import { DataTable } from "@lusterui/react-pro";
<DataTable
label="Invoices"
columns={columns}
rows={rows}
rowKey={(row) => row.id}
sort={sort}
onSortChange={setSort}
selectedKeys={selected}
onSelectedKeysChange={setSelected}
onRowClick={(row) => openInvoice(row.id)}
/>
Props
| Prop | Type | Default |
|---|---|---|
label | string (required). Accessible name (aria-label) of the table. | – |
columns | DataTableColumn<Row>[] (required). Column definitions (key, header, align, width, emphasis, status, render, sortable, hideBelow, minWidth). | – |
rows | Row[] (required). Rows in display order (filtered and sorted by the caller). | – |
rowKey | (row: Row, index: number) => Key. Pass when using selection, filtering, or sorting. | Row index |
container | 'card' | 'none' | 'inset'. White card surface, bare table inside a parent card, or deprecated inset. | 'card' |
toolbar / filterBar / footer | ReactNode. Optional list-page toolbar, FilterBar row above the table, and footer below (e.g. Pagination). | – |
title / description / titleActions | ReactNode. Title bar for dashboard or report tables. | – |
sort / onSortChange | DataTableSort | null / (sort: DataTableSort) => void. Controlled sort state. | – |
selectedKeys / defaultSelectedKeys | ReadonlySet<Key> | readonly Key[]. Controlled or uncontrolled selected row keys (adds a leading checkbox column and select-all header box). | – |
onSelectedKeysChange | (keys: Set<Key>) => void. Called with the next selection. | – |
bulkActions | DataTableBulkAction[]. Floating bulk-action bar shown while rows are selected. | – |
onRowClick / rowActions | (row: Row) => void / (row: Row) => DataTableRowAction[]. Row activation and trailing icon buttons or menus. | – |
groupBy / groups / total | Expandable row groups (each in its own <tbody>) and a bottom <tfoot> total row. | – |
loading / empty / emptyMessage / error | boolean / DataTableMessage / string. Skeleton rows, empty status row, and alert error state. | false / 'No results' |
When to use something else
- A few key figures with their change: use Stat cards in a row.
- Only a status filter row without a table under it: use FilterBar.
- Values over time: use Chart.
Nucleo Icons, https://nucleoapp.com/. Copyright © Nucleo. Copyright notice. Component examples use Hugeicons free (Stroke Rounded), MIT License, Copyright (c) 2025 Hugeicons. License