TanStack Table
TanStack Table is a headless table library supporting multiple frameworks including React, Vue, and Svelte. It provides full control over UI markup and styling while offering powerful datagrid features like sorting, filtering, grouping, and pagination. With over 27,000 GitHub stars, it's an industry-standard table solution.
tabledatagridheadless-uidata-managementvirtualization
๐ฎ Playground
Loading playground...
Use cases
- โขAdmin dashboards and back-office systems requiring complex data management
- โขLarge dataset tables with sorting, filtering, and grouping (virtualization supported)
- โขCustom datagrid implementations aligned with design systems
- โขSaaS applications requiring server-side pagination and infinite scrolling
- โขMulti-framework projects needing consistent table logic across platforms
Good for
- โ100% customizable UI with headless architecture for perfect design system integration
- โOfficial support for 7+ frameworks including React, Vue, Svelte, Angular, and Solid
- โEnterprise-grade features built-in: sorting, filtering, grouping, aggregation, row selection, virtualization
- โLightweight yet optimized for server-side rendering and large dataset handling
- โFull TypeScript support with type safety and autocomplete
Not good for
- โNo default UI provided due to headless approach, requiring initial setup time
- โLearning curve exists due to powerful features and API familiarity required
- โMay be over-engineering for simple table requirements
Installation
$npm install @tanstack/react-table
Example
import { useReactTable, getCoreRowModel, flexRender } from "@tanstack/react-table"
const data = [
{ name: "Alice", email: "alice@example.com" },
{ name: "Bob", email: "bob@example.com" },
{ name: "Charlie", email: "charlie@example.com" },
]
const columns = [
{ accessorKey: "name", header: "Name" },
{ accessorKey: "email", header: "Email" },
]
export default function Demo() {
const table = useReactTable({
data,
columns,
getCoreRowModel: getCoreRowModel(),
})
return (
<table style={{ width: "100%", borderCollapse: "collapse" }}>
<thead>
{table.getHeaderGroups().map(headerGroup => (
<tr key={headerGroup.id}>
{headerGroup.headers.map(header => (
<th key={header.id} style={{ border: "1px solid #ccc", padding: "8px", textAlign: "left" }}>
{flexRender(header.column.columnDef.header, header.getContext())}
</th>
))}
</tr>
))}
</thead>
<tbody>
{table.getRowModel().rows.map(row => (
<tr key={row.id}>
{row.getVisibleCells().map(cell => (
<td key={cell.id} style={{ border: "1px solid #ccc", padding: "8px" }}>
{flexRender(cell.column.columnDef.cell, cell.getContext())}
</td>
))}
</tr>
))}
</tbody>
</table>
)
}Comparison
"More flexible than AG Grid, more features than react-table v7."
Trust Metrics
27.7K
GitHub Stars
7.9M
Weekly Downloads
Last Commit:Dec 6, 2025
Used by
FacebookAmazonMicrosoft