UnflowUI
Components

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

Total paid$19,600.00
Incoming$19,600.00
Overdue$19,600.00

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

Total paid$19,600.00
Incoming$19,600.00
Overdue$19,600.00
INVO-2026-0012026-04-21
$200.00

paid

INVO-2026-0022026-04-25
$450.00

overdue

INVO-2026-0032026-05-02
$120.00

draft

INVO-2026-0042026-05-10
$980.00

sent

INVO-2026-0052026-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

Total paid$19,600.00
Incoming$19,600.00
Overdue$19,600.00
INVO-2026-0012026-04-21
$200.00

paid

INVO-2026-0022026-04-25
$450.00

overdue

INVO-2026-0032026-05-02
$120.00

draft

INVO-2026-0042026-05-10
$980.00

sent

INVO-2026-0052026-05-14
$300.00

disputed

Props

PropTypeDescription
titleReactNodeOptional.
descriptionReactNodeOptional.
infographicsReactNodeOptional. Rendered aligned with the title/description row.
exportActionsDataTableHeaderAction[]1 action → Button, 2+ → SplitButton.
createActionsDataTableHeaderAction[]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 — infographics is intentionally a plain slot, not a new visual primitive to design/maintain.
  • exportActions is UI-only — DataTableHeader never touches your data; you own what "export" actually does in each action's onClick.