@objectifthunes/whiteboard
DATA TABLES

TableToolbar

The controls above a table: full-width search on its own line, filters below, actions and a columns menu pinned right.


PREVIEW
InvoiceClientAmountStatus
INV-2043Acme Industries€4,280due
INV-2042Northwind Trading€1,150paid
INV-2041Globex€9,600due
INV-2040Initech€320paid
SOURCE
import { TableToolbar, SearchBar, FilterTabs, DataTable } from '@objectifthunes/whiteboard'

// columns live in state so the Columns menu can toggle their hidden flag
const [columns, setColumns] = useState<Column<Row>[]>([...])

<TableToolbar
  search={<SearchBar value={q} onChange={setQ} label="" placeholder="Search…" />}
  filters={<FilterTabs value={status} onChange={setStatus} options={STATUSES} />}
  columns={columns}
  onColumnsChange={setColumns}
  actions={<Button><Plus size={13} />New invoice</Button>}
/>

<DataTable columns={columns} rows={rows} rowKey={r => r.id} />
NOTES

Search gets its own full-width line, and filters go on the next one. It is the control people reach for first and it needs the room; cramming both onto one row is what makes admin headers feel cramped.

Pass the same columns array you gave DataTable, plus a setter, and you get a Columns menu that toggles each column's hidden flag. The rows use keepOpen, so you can hide three columns without reopening the menu three times. The last visible column cannot be hidden — an empty table is never what the user meant.

Bulk actions for selected rows are deliberately not here. Those belong in StickyBar, pinned to the bottom of the viewport where they stay reachable however far down the table you have scrolled.