Data Table

Headless TanStack Table composed with the Table primitive. Sortable columns, pagination hooks, row selection — you own the rendering. No motion; the transitions live on the underlying Table rows.

Basic

InvoiceClientStatusAmount
INV-001Northwindpaid$2,400.00
INV-002Contosopending$980.00
INV-003Acmeoverdue$1,620.00
INV-004Fabrikampaid$540.00
INV-005Globexpending$3,200.00

In a Card

Wrap the table in Card when it lives next to other content blocks. Selected rows tint with bg-accent/30 — click Select to preview.

Recent invoices

Tap an invoice to toggle selection.

InvoiceClientStatusAmount
INV-001Northwindpaid$2,400.00
INV-002Contosopending$980.00
INV-003Acmeoverdue$1,620.00
INV-004Fabrikampaid$540.00
INV-005Globexpending$3,200.00

createSvelteTable options

A thin runes-aware wrapper over TanStack's createTable. Every option reactive to Svelte 5 state.

PropTypeDescription
TData[] (getter)Row data. Pass as a getter so the table reruns when rows change.
ColumnDef<TData>[]Column definitions. Use accessorKey, header, and cell hooks like vanilla TanStack.
Partial<TableState>Pass reactive getters for sorting, filters, pagination, row selection.
(updater) => voidCalled whenever sorting changes. Receives a value or updater fn from TanStack.
RowModelRequired. Usually getCoreRowModel(). Combine with getSortedRowModel, getFilteredRowModel, etc.

<FlexRender /> props

PropTypeDescription
ColumnDefTemplate<TContext>The header or cell renderer from the column definition.
TContextContext object from TanStack — row, cell, or header context.