# tanstack/table architecture

> Architecture diagram of the GitHub repository tanstack/table, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/tanstack/table
- Repository: https://github.com/tanstack/table

## Overview

TanStack Table is a headless datagrid library: application developers configure a table and its features through a framework adapter, then use the resulting table APIs and render their own UI. The shared core defines table construction, state, and row-model capabilities; adapters connect that engine to framework reactivity and rendering. An optional worker subsystem offloads selected row-model stages. The README documents the adapter breadth and major data-grid capabilities; worker and adapter call links below are limited to relationships visible in the supplied excerpts or index.

Main entry points: [`packages/table-core/src/core/table/constructTable.ts`](https://github.com/tanstack/table/blob/main/packages/table-core/src/core/table/constructTable.ts) (Table construction), [`packages/table-core/src/worker/initTableWorker.ts`](https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/initTableWorker.ts) (Worker runtime), [`packages/react-table/src/useTable.ts`](https://github.com/tanstack/table/blob/main/packages/react-table/src/useTable.ts) (React adapter), [`packages/vue-table/src/useTable.ts`](https://github.com/tanstack/table/blob/main/packages/vue-table/src/useTable.ts) (Vue adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_adapters["Framework adapters"]
  node_react["React adapter<br/>[useTable.ts]"]
  node_vue["Vue adapter<br/>[useTable.ts]"]
  node_lit["Lit controller<br/>[TableController.ts]"]
  node_other_adapters["Other adapters"]
end

subgraph group_engine["Table engine"]
  node_core["Table construction<br/>[constructTable.ts]"]
  node_types["Table types<br/>[Table.ts]"]
  node_features_config["Feature configuration<br/>[TableFeatures.ts]"]
end

subgraph group_features["Table capabilities"]
  node_row_models["Row models"]
  node_grid_features["Grid features"]
end

subgraph group_worker["Worker processing"]
  node_worker_bridge["Worker bridge"]
  node_worker_models["Worker row models"]
  node_worker_runtime["Worker runtime<br/>[initTableWorker.ts]"]
  node_worker_protocol["Worker protocol"]
end

subgraph group_devtools["Table devtools"]
  node_devtools_core["Devtools panel<br/>[TableDevtools.tsx]"]
  node_framework_devtools["Framework devtools"]
end

node_developer(("Application developer"))

node_developer -->|"configures"| node_react
node_developer -->|"configures"| node_vue
node_developer -->|"configures"| node_lit
node_developer -->|"chooses binding"| node_other_adapters
node_react -->|"constructs table"| node_core
node_vue -->|"constructs table"| node_core
node_lit -->|"uses table core"| node_core
node_core -.->|"accepts features"| node_features_config
node_features_config -->|"configures"| node_grid_features
node_developer -->|"selects capabilities"| node_grid_features
node_developer -->|"uses row models"| node_row_models
node_worker_models -->|"syncs work"| node_worker_bridge
node_worker_bridge -->|"exchanges messages"| node_worker_protocol
node_worker_runtime -->|"handles messages"| node_worker_protocol
node_worker_runtime -->|"constructs worker table"| node_core
node_framework_devtools -->|"uses shared panel"| node_devtools_core

click node_react "https://github.com/tanstack/table/blob/main/packages/react-table/src/useTable.ts"
click node_vue "https://github.com/tanstack/table/blob/main/packages/vue-table/src/useTable.ts"
click node_lit "https://github.com/tanstack/table/blob/main/packages/lit-table/src/TableController.ts"
click node_other_adapters "https://github.com/tanstack/table/tree/main/packages"
click node_core "https://github.com/tanstack/table/blob/main/packages/table-core/src/core/table/constructTable.ts"
click node_types "https://github.com/tanstack/table/blob/main/packages/table-core/src/types/Table.ts"
click node_features_config "https://github.com/tanstack/table/blob/main/packages/table-core/src/types/TableFeatures.ts"
click node_row_models "https://github.com/tanstack/table/tree/main/packages/table-core/src/core/row-models"
click node_grid_features "https://github.com/tanstack/table/tree/main/packages/table-core/src/features"
click node_worker_bridge "https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/createTableWorker.ts"
click node_worker_models "https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/createWorkerRowModel.ts"
click node_worker_runtime "https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/initTableWorker.ts"
click node_worker_protocol "https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/tableWorkerProtocol.ts"
click node_devtools_core "https://github.com/tanstack/table/blob/main/packages/table-devtools/src/TableDevtools.tsx"
click node_framework_devtools "https://github.com/tanstack/table/blob/main/packages/react-table-devtools/src/useTanStackTableDevtools.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_react,node_vue,node_lit,node_other_adapters toneBlue
class node_core,node_types,node_features_config toneAmber
class node_row_models,node_grid_features toneMint
class node_worker_bridge,node_worker_models,node_worker_runtime,node_worker_protocol toneRose
class node_devtools_core,node_framework_devtools,node_developer toneIndigo
```

## Components

### Framework adapters

- [React adapter](https://github.com/tanstack/table/blob/main/packages/react-table/src/useTable.ts): `packages/react-table/src/useTable.ts`
- [Vue adapter](https://github.com/tanstack/table/blob/main/packages/vue-table/src/useTable.ts): `packages/vue-table/src/useTable.ts`
- [Lit controller](https://github.com/tanstack/table/blob/main/packages/lit-table/src/TableController.ts): `packages/lit-table/src/TableController.ts`
- [Other adapters](https://github.com/tanstack/table/tree/main/packages): `packages`

### Table engine

- [Table construction](https://github.com/tanstack/table/blob/main/packages/table-core/src/core/table/constructTable.ts): `packages/table-core/src/core/table/constructTable.ts`
- [Table types](https://github.com/tanstack/table/blob/main/packages/table-core/src/types/Table.ts): `packages/table-core/src/types/Table.ts`
- [Feature configuration](https://github.com/tanstack/table/blob/main/packages/table-core/src/types/TableFeatures.ts): `packages/table-core/src/types/TableFeatures.ts`

### Table capabilities

- [Row models](https://github.com/tanstack/table/tree/main/packages/table-core/src/core/row-models): `packages/table-core/src/core/row-models`
- [Grid features](https://github.com/tanstack/table/tree/main/packages/table-core/src/features): `packages/table-core/src/features`

### Worker processing

- [Worker bridge](https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/createTableWorker.ts): `packages/table-core/src/worker/createTableWorker.ts`
- [Worker row models](https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/createWorkerRowModel.ts): `packages/table-core/src/worker/createWorkerRowModel.ts`
- [Worker runtime](https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/initTableWorker.ts): `packages/table-core/src/worker/initTableWorker.ts`
- [Worker protocol](https://github.com/tanstack/table/blob/main/packages/table-core/src/worker/tableWorkerProtocol.ts): `packages/table-core/src/worker/tableWorkerProtocol.ts`

### Table devtools

- [Devtools panel](https://github.com/tanstack/table/blob/main/packages/table-devtools/src/TableDevtools.tsx): `packages/table-devtools/src/TableDevtools.tsx`
- [Framework devtools](https://github.com/tanstack/table/blob/main/packages/react-table-devtools/src/useTanStackTableDevtools.ts): `packages/react-table-devtools/src/useTanStackTableDevtools.ts`

### Other components

- **Application developer**

## Connections

- Application developer → React adapter: configures (evidence: `README.md`)
- Application developer → Vue adapter: configures (evidence: `README.md`)
- Application developer → Lit controller: configures (evidence: `README.md`)
- Application developer → Other adapters: chooses binding (evidence: `README.md`)
- React adapter → Table construction: constructs table (evidence: `packages/react-table/src/useTable.ts`)
- Vue adapter → Table construction: constructs table (evidence: `packages/vue-table/src/useTable.ts`)
- Lit controller → Table construction: uses table core (evidence: `packages/lit-table/src/TableController.ts`)
- Table construction → Feature configuration: accepts features
- Feature configuration → Grid features: configures (evidence: `packages/table-core/src/types/TableFeatures.ts`)
- Application developer → Grid features: selects capabilities (evidence: `README.md`)
- Application developer → Row models: uses row models (evidence: `README.md`)
- Worker row models → Worker bridge: syncs work (evidence: `packages/table-core/src/worker/createWorkerRowModel.ts`)
- Worker bridge → Worker protocol: exchanges messages (evidence: `packages/table-core/src/worker/createTableWorker.ts`)
- Worker runtime → Worker protocol: handles messages (evidence: `packages/table-core/src/worker/initTableWorker.ts`)
- Worker runtime → Table construction: constructs worker table (evidence: `packages/table-core/src/worker/initTableWorker.ts`)
- Framework devtools → Devtools panel: uses shared panel (evidence: `packages/react-table-devtools/src/useTanStackTableDevtools.ts`)
