TanStack Table

Knowledge base from the official TanStack Table v9 documentation (tanstack.com/table) — headless table/datagrid library with framework adapters for React, Vue, Solid, Svelte, Angular, and more. Use when building or debugging a data table/grid, choosing between client-side and server-side row processing, wiring up sorting/filtering/pagination/grouping/selection/pinning/sizing, working with the v9 tableFeatures plugin architecture, migrating from v8's useReactTable, or writing a custom table feature. Priorizes the React adapter (@tanstack/react-table); other frameworks get brief compatibility notes only.

54 capítulos

TanStack Table

Package: @tanstack/table-core (+ per-framework adapters, primarily @tanstack/react-table) | Chapters: 54 (10 Overview/Handbook + 19 Feature Guides + 8 API Reference, headless, React-focused) | Generated: 2026-08-25

How to Use This Skill

  • Without arguments — load Core Patterns & Conventions below for the v9 mental model (headless, feature-based, TanStack Store state).
  • With a feature name — ask about sorting, row selection, column pinning, etc.; I find and read the matching chapter.
  • With a chapter number — ask for ch035; I load that specific chapter.
  • With an API name — ask about useTable, tableFeatures, createColumnHelper, FlexRender, etc.; I find the chapter that defines/uses it.
  • Browse — ask "what chapters do you have?" or "what's in the Feature Guides group?" to see the full index below.

When you ask about a topic not covered in Core Patterns below, I will read the relevant chapter file before answering.


Core Patterns & Conventions

Headless, always. This library renders nothing — no markup, no CSS. useTable() returns a table instance with state and getters (table.getHeaderGroups(), table.getRowModel().rows); you write every <table>/<div> element yourself.

Everything is opt-in via tableFeatures({...}). v9's plugin architecture means a table with tableFeatures({}) has only core row/column/cell construction — no sorting, filtering, pagination, anything. Register exactly the features (rowSortingFeature, columnFilteringFeature, ...) a table needs; unregistered features' state/APIs don't exist on the type, and their code doesn't ship in the bundle.

Feature ≠ row model ≠ function registry — three separate slots. A feature (rowSortingFeature) adds state/options/APIs. A row-model factory (sortedRowModel: createSortedRowModel()) does the actual client-side data processing — omit it and set the matching manual*: true flag for server-side processing while keeping the feature's state/APIs. A function registry (sortFns, filterFns, aggregationFns) supplies named implementations referenced by string in column defs — register individually, never spread the full built-in registry (it defeats tree-shaking).

State is TanStack Store atoms. table.atoms.<slice>.get() reads without subscribing; useTable's selector argument (default: everything) or table.Subscribe (scoped to a slice/atom) is what triggers re-renders. Own a slice externally via the atoms table option (v9-recommended) or the classic state/on[X]Change pair.

row/cell/column/header are stable references — read their state-dependent methods inside a Subscribe, not just their props. A nested component receiving only row as a prop can be memoized by React/the compiler even when row.getIsSelected() would now return something different. This is the one recurring gotcha across selection, sorting, pinning, and every other stateful feature.

Fixed row-model pipeline order: filter → group → sort → expand → paginate (row pinning and column ordering/pinning/grouping have their own separate, also-fixed reorder pipelines).

Always render through FlexRender (table.FlexRender / <FlexRender .../>), never by reading columnDef.header/.cell directly — it's a template (string, node, or function) and FlexRender resolves it correctly, including cell-vs-aggregatedCell and grouping-placeholder logic.


Chapter Index

Overview & Setup

#TitleKey Concepts
ch001Introductionheadless UI, framework-agnostic core, TanStack ecosystem composition
ch002Framework Adapters & Installation@tanstack/react-table, per-framework packages, devtools install
ch003Devtoolstable key, TanStackDevtools, useTanStackTableDevtools
ch004Agent Skills (TanStack Intent)npx @tanstack/intent install, node_modules SKILL.md guidance

Getting Started & Migration

#TitleKey Concepts
ch005Quick Start (React)tableFeatures, useTable, FlexRender, first sortable table
ch006Migrating to TanStack Table V9 (React)useReactTable→useTable, features option, breaking changes
ch007Using useLegacyTable for Incremental Migration@tanstack/react-table/legacy, deprecated bridge

Handbook (Core Guides)

#TitleKey Concepts
ch008Features GuidestockFeatures, feature/row-model/function split
ch009Data GuideTData, stable reference, deep keys, subRows
ch010Client-Side vs Server-Side Guidemanual* flags, when to go server-side
ch011Column Definitions Guideaccessor/display/group columns, createColumnHelper
ch012Table Instance Guidetable creation across adapters, atoms/store
ch013Row Models Guidepipeline order, create*RowModel slots
ch014Worker Row Models Guide (Experimental)Web Worker offloading, 100k+ rows
ch015Rows GuidegetRowId, getDisplayIndex, row.original
ch016Cells Guidecell.getValue, FlexRender for cells
ch017Header Groups Guidemulti-row headers
ch018Headers GuidecolSpan/rowSpan, header row spanning
ch019Columns Guidecolumn objects vs. rendering
ch020Table and Column Meta GuidemetaHelper, tableMeta/columnMeta/filterMeta
ch021Helpers GuidetableFeatures, tableOptions, createColumnHelper
ch022Table State (React) Guideatoms, selectors, Subscribe, external atoms
ch023React Compiler Guidestable references, Subscribe for nested components
ch024Composable Tables (createTableHook) GuideuseAppTable, shared components
ch025Table Context GuideuseTableContext/useCellContext/useHeaderContext
ch026FlexRender (React) GuideFlexRender vs flexRender
ch027Custom Features (React) GuideTableFeature, writing a plugin

Feature Guides

#TitleKey Concepts
ch028Cell Selection (React) Guiderange operation log, drag/Shift/Ctrl selection
ch029Cell Spanning (React) GuidespanRows, spanColumns, stateless merges
ch030Column Ordering (React) GuidecolumnOrder, DnD, order pipeline
ch031Column Pinning (React) Guidestart/center/end, sticky CSS vs. split tables
ch032Column Sizing (React) Guidesize/minSize/maxSize
ch033Column Resizing (React) Guideresize mode, performant resizing
ch034Column Visibility (React) GuidecolumnVisibility map, getVisible* APIs
ch035Column Filtering (React) Guide18 built-in filterFns, constructFilterFn
ch036Global Filtering (React) GuideglobalFilterFn, 12 built-ins
ch037Fuzzy Filtering (React) Guidematch-sorter-utils, filterMeta + paired sort
ch038Faceting (React) Guidefacet excludes own filter, bucketing
ch039Aggregation (React) GuidegetAggregationValue, custom definitions
ch040Grouping (React) Guidegrouping state, groupedColumnMode
ch041Expanding (React) GuidegetSubRows vs. getRowCanExpand
ch042Pagination (React) GuidepageIndex/pageSize, cursor pagination
ch043Row Pinning (React) Guidetop/center/bottom
ch044Row Selection (React) GuidegetRowId, Shift range, deselectParents
ch045Sorting (React) Guide6 built-in sortFns, invertSorting, multi-sort
ch046Virtualization (React) Guide@tanstack/react-virtual, not a Table feature

API Reference

#TitleKey Concepts
ch047Core Table TypesTable, TableOptions, TableState, TableFeature
ch048React Adapter APIuseTable, ReactTable, Subscribe, FlexRender
ch049Column & Cell TypesColumnDef variants, Cell/Header/Context types
ch050Row Model Factoriesthe 7+ create*RowModel functions
ch051Feature Flags Referenceevery *Feature export, one table
ch052Filter/Sort/Aggregation Function TypesFilterFn, SortFn, AggregationFn* types
ch053State Types Referenceevery state slice's type, one table
ch054Legacy API (v8 Compatibility)@tanstack/react-table/legacy full reference

Topic Index

  • Aggregation → ch039
  • Cell selection → ch028
  • Cell spanning → ch029
  • Column definitions → ch011, ch049
  • Column filtering → ch035, ch052
  • Column ordering/pinning/sizing/resizing/visibility → ch030–034
  • Composable tables / createTableHook → ch024, ch025, ch048
  • Custom features (plugins) → ch027, ch047
  • Devtools → ch003
  • Expanding → ch041
  • Faceting → ch038
  • FlexRender → ch026, ch048
  • Fuzzy filtering → ch037
  • Global filtering → ch036
  • Grouping → ch040
  • Meta (table/column/filter) → ch020
  • Migration from v8 → ch006, ch007, ch054
  • Pagination → ch042
  • React Compiler → ch023
  • Row models / row model pipeline → ch013, ch050
  • Row pinning / row selection → ch043, ch044
  • Server-side data → ch010
  • Sorting → ch045, ch052
  • State management (atoms, Subscribe) → ch022, ch025
  • tableFeatures / tableOptions / createColumnHelper → ch008, ch021, ch047
  • Virtualization → ch046
  • Worker row models → ch014

Supporting Files

  • glossary.md — key terms with definitions and chapter pointers
  • patterns.md — end-to-end setup recipes (server-driven table, fuzzy search, custom feature, performant resizing, ...)
  • cheatsheet.md — decision rules, defaults table, feature↔row-model↔manual-flag table, tells & smells

Scope & Limits

This skill covers the TanStack Table v9 documentation as of the fetch date in the source, prioritizing the React adapter (@tanstack/react-table) — matching this project's own stack. Other framework adapters (Vue, Solid, Svelte, Angular, Ember, Lit, Alpine, vanilla) exist and share the same core concepts/state model, but their framework-specific syntax is not covered in depth; see ch002 for the package name and minimum version per framework, and the Composability sections of ch001/ch010 for how the framework-agnostic core relates to each adapter.

This is a headless table library — it renders no markup or styles. It pairs naturally with a styling/component layer (Tailwind, shadcn/ui, Radix/Base UI for building custom cell controls) and with react-hook-form-docs for editable-cell forms, tanstack-query-docs (if present in this library) for server-state fetching feeding server-side row processing, and react-docs (if present) for general React 19 patterns underlying every hook in this skill.

Worker Row Models (ch014) is explicitly marked experimental by the source and should be treated as a last resort for 100,000+ client-side rows, not a default optimization.