svelte/headless table.
A powerful, composable table library for Svelte 5 — bring your own markup, bring your own styles, and snap on as many of the 15 plugins as you need. Sorting, filtering, pagination, grouping, expansion, selection, column resizing, sub-rows, virtual scroll. Fully typed, MIT, zero opinions about how the table renders.
render thousands of rows.
10,000 rows handed to the table, only the viewport-visible window mounts.
Sorting and filtering still iterate the full dataset — the windowing layer sits
downstream. Drop in addVirtualScroll and you're done.
| # | Name | Company | Department | Salary |
|---|---|---|---|---|
| 0 | Alice Smith | Acme | Engineering | $30,000 |
| 1 | Bob Davis | Globex | Sales | $31,234 |
| 2 | Carol Jones | Initech | Marketing | $32,468 |
| 3 | David Johnson | Hooli | Operations | $33,702 |
| 4 | Emma Wilson | Massive | Finance | $34,936 |
| 5 | Frank Garcia | Stark | Legal | $36,170 |
| 6 | Grace Williams | Wayne | Engineering | $37,404 |
| 7 | Henry Moore | Wonka | Sales | $38,638 |
why svelte-headless-table.
The most complete headless table primitive for Svelte 5.
Headless by Design
No markup, no styles, no opinions. You own the `<table>`. The library produces reactive row + column view models and stays out of the way.
Plugin Composition
15 plugins — sorting, column + table filters, pagination, sub-rows, group-by, expanded rows, selection, column reordering, hidden columns, column resizing, grid layout, flatten, data export, and virtual scroll — composed declaratively on a single `createTable` call.
Svelte 5 Runes
Rebuilt from the ground up against Svelte 5. Internal state uses `$state`, derivations use `$derived`, and the public surface still ships ordinary stores so existing render code keeps working.
TypeScript First
Generics carry your row type through every plugin, every cell renderer, and every accessor. Misnamed columns, mistyped values, and broken filter functions all fail at compile time.
Virtual Scroll
Render windows of tens of thousands of rows with `addVirtualScroll`. Sorting, filtering, and pagination still iterate the full dataset upstream of the windowing layer.
Custom Cell Renderers
Bring any Svelte component into a cell via `createRender`. Editable cells, action menus, embedded charts, status pills — all just components handed to the view model.
how we compare.
Honest, side-by-side comparisons with every major Svelte (and a couple of multi-framework) table libraries.
| library | category | svelte 5 | headless | plugins | typescript | pricing | read more |
|---|---|---|---|---|---|---|---|
| @humanspeak/svelte-headless-table ● | headless · svelte 5 | yes | yes | 15 | yes | free · MIT | this row |
| TanStack Table | headless · multi-framework | via community drop-in | yes | core modules | yes | free | read more → |
| @vincjo/datatables | headless · svelte 5 | yes | yes | sort/filter/page/select/lazy | yes | free | read more → |
| svelte-table | headless · single component | not declared | yes | no | yes | free | read more → |
| Flowbite Svelte Datatable | styled · tailwind + flowbite | yes | no | no | yes | free | read more → |
| AG Grid | styled · multi-framework | community wrapper · stale | no | yes | yes | community + enterprise | read more → |
| Handsontable | spreadsheet · react/angular/vue | no | no | yes | yes | commercial | read more → |
built for ai-assisted code.
Point Cursor, Claude Code, or any LLM at the manifests below and they know the full svelte-headless-table API — every plugin, every accessor, every cell renderer pattern. Migration prompts from TanStack Table just work.
/llms.txt
Compact map. Project blurb, doc URLs, link to the full reference. Drop into any agent for ground-truth lookup before fetching individual pages.
/llms-full.txt
Full reference, one document. Every plugin, every accessor, every cell renderer pattern — concatenated from the per-page mirrors. Optimised for "paste the whole library into one context window" prompts.
/docs/<slug>.md
Every doc page mirrored as raw markdown — Svelte scripts stripped, fenced code preserved. The citation surface ChatGPT, Perplexity, and Claude prefer over rendered HTML.
Use https://table.svelte.page/llms.txt as the source for @humanspeak/svelte-headless-table. Build a Svelte 5 admin table
with addSortBy, addColumnFilters, addPagination,
and a custom cell renderer for the status column.explore live examples.
Three self-contained demos — every plugin composed, virtual-scroll over 10k rows, and per-cell inline editing — all with the full source one click away.
Kitchen Sink
Every plugin wired onto one table — sorting, filtering, pagination, group-by, expansion, selection, column resizing, hidden columns. The classic "show me everything" demo.
Virtual Scroll
Render windows of 10k+ rows without mounting the full DOM. Sorting and pagination still iterate the full dataset upstream of the windowing layer.
Editable Table
Per-cell inline editing through a custom cell renderer that writes the new value back into the underlying writable store.