DataTable props
<DataTable /> is mostly driven by the instance from useDataTable. It accepts the presentational props below, and spreads any other div props onto the root element.
| Prop | Type | Description |
|---|---|---|
table# | DataTableInstance<TData> | The instance returned by `useDataTable`. |
tsx
<DataTable table={table} className="mx-auto max-w-5xl" />
Styling inner parts
To reach the scroll surface, rows, cells or any other part, use the slotProps option on useDataTable — for example slotProps: { surface: { className: "max-h-[600px]" } } bounds the scroll surface for a sticky header or a virtualized list.
← PreviousColumn optionsPer-column configuration lives on the standard TanStack columnDef.meta object, which the table augments with the fields below (fully typed wherever meta is read).Next →Table instanceuseDataTable returns the standard TanStack table instance with three additions: the table's UI state in table.getState() (density, editing, filter modes…), methods to change it on table itself, and the resolved options and DOM refs on table.dataTable.