DataTableHeader
A standalone page/section header — title, description, an infographics slot, and export/create actions — meant to sit above DataTable, not coupled to its state.
Overview
DataTableHeader is deliberately not part of DataTable's own props: title, description, infographics (e.g. stat tiles), and the export/create actions are page-chrome concerns, not grid behavior, so they live in their own composable component you place above <DataTable>:
<DataTableHeader
title="Invoices"
description="View and pay your invoices"
createActions={[{ label: 'Create invoice', onClick: handleCreate }]}
/>
<DataTable columns={columns} rows={rows} showToolbar />Import
import { DataTableHeader } from '@unflowio/ui/components/DataTableHeader';Basic
title and description are both optional and independent of one another.
Invoices
View and pay your invoices
Infographics
infographics is a generic ReactNode slot — render whatever stat tiles/markup you want; DataTableHeader only provides the flex layout aligning it with the title/description row.
Invoices
View and pay your invoices
Export & create actions
exportActions and createActions share the same one-or-many rule: pass one action and it renders as a plain Button; pass two or more and it renders as a SplitButton (the first action is the primary click target, the rest become dropdown items). createActions is always the rightmost element; exportActions renders immediately to its left.
Products & Services
Subtitle text here
<DataTableHeader
title="Products & Services"
description="Subtitle text here"
exportActions={[
{ label: 'Export CSV', icon: <DownloadIcon />, onClick: exportCsv },
{ label: 'Export PDF', onClick: exportPdf },
]}
createActions={[{ label: 'Create a product', icon: <PlusIcon />, onClick: handleCreate }]}
/>With DataTable
The intended pairing in practice — DataTableHeader above a DataTable, sharing no state or props with it directly.
Invoices
View and pay your invoices
| INVO-2026-001 | 2026-04-21 | $200.00 | paid | |
|---|---|---|---|---|
| INVO-2026-002 | 2026-04-25 | $450.00 | overdue | |
| INVO-2026-003 | 2026-05-02 | $120.00 | draft | |
| INVO-2026-004 | 2026-05-10 | $980.00 | sent | |
| INVO-2026-005 | 2026-05-14 | $300.00 | disputed |
Full page example
A complete real-world composition: DataTableHeader (title, infographics, export/create actions), DataTable with inlineFilters (Status/Amount/Date, each a real QuickFilterField) and checkboxSelection, and BulkActionsBar appearing once rows are selected. All three components remain independent — they only share the plain selectionModel: Set<RowId> state you already own.
Invoices
View and pay your invoices
| INVO-2026-001 | 2026-04-21 | $200.00 | paid | |
|---|---|---|---|---|
| INVO-2026-002 | 2026-04-25 | $450.00 | overdue | |
| INVO-2026-003 | 2026-05-02 | $120.00 | draft | |
| INVO-2026-004 | 2026-05-10 | $980.00 | sent | |
| INVO-2026-005 | 2026-05-14 | $300.00 | disputed |
Props
| Prop | Type | Description |
|---|---|---|
title | ReactNode | Optional. |
description | ReactNode | Optional. |
infographics | ReactNode | Optional. Rendered aligned with the title/description row. |
exportActions | DataTableHeaderAction[] | 1 action → Button, 2+ → SplitButton. |
createActions | DataTableHeaderAction[] | Same rule as exportActions. Always the rightmost element. |
slotProps | { text?, title?, description?, infographics?, actions? } | Per-part className/prop overrides. |
DataTableHeaderAction: { label: string, onClick?: () => void, icon?: ReactNode, disabled?: boolean }.
Known scope boundaries
- No built-in stat-tile component —
infographicsis intentionally a plain slot, not a new visual primitive to design/maintain. exportActionsis UI-only —DataTableHeadernever touches your data; you own what "export" actually does in each action'sonClick.
Toolbar & Panels
The composable-parts family behind DataTable's default toolbar — Toolbar, ToolbarButton, QuickFilter, ColumnsPanel, and FilterPanel — usable standalone or fully custom-composed.
BulkActionsBar
A floating bar for bulk row-selection actions — pairs with DataTable's selection model, not part of DataTable itself.