DataTable

Pro

Semantic 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.

See pricing

Static preview of a records table with a toolbar, selection checkboxes, avatars, and status badges.

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

PropTypeDefault
labelstring (required). Accessible name (aria-label) of the table.–
columnsDataTableColumn<Row>[] (required). Column definitions (key, header, align, width, emphasis, status, render, sortable, hideBelow, minWidth).–
rowsRow[] (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 / footerReactNode. Optional list-page toolbar, FilterBar row above the table, and footer below (e.g. Pagination).–
title / description / titleActionsReactNode. Title bar for dashboard or report tables.–
sort / onSortChangeDataTableSort | null / (sort: DataTableSort) => void. Controlled sort state.–
selectedKeys / defaultSelectedKeysReadonlySet<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.–
bulkActionsDataTableBulkAction[]. 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 / totalExpandable row groups (each in its own <tbody>) and a bottom <tfoot> total row.–
loading / empty / emptyMessage / errorboolean / 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