# TanStack Table

> Headless table logic: sorting, filtering, pagination, selection and grouping, rendered with your own markup.

Source: https://tastebase.ehsanulsiam.workers.dev/browse/tanstack-table

free

Headless table logic: sorting, filtering, pagination, selection and grouping, rendered with your own markup.

by TanStack (Tanner Linsley)[GitHub](https://github.com/TanStack/table)[npm](https://npmjs.com/package/@tanstack/react-table)

[visit](https://tanstack.com/table?utm_source=tastebase&utm_medium=referral&utm_content=detail-page)

[https://tanstack.com/table](https://tanstack.com/table?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

## Try these

no preview

### [AG Grid](https://tastebase.ehsanulsiam.workers.dev/browse/ag-grid)

Batteries-included data grid: editing, filters, virtualization and themes built in; Enterprise features are paid.

no preview

### [shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)

Copy-in React components on Tailwind, built on Base UI, Radix or React Aria, plus a registry CLI.

no preview

### [shadcn-vue](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-vue)

The Vue port of shadcn/ui: copy-in Tailwind components on Reka UI.

no preview

### [shadcn-svelte](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-svelte)

The Svelte 5 port of shadcn/ui: copy-in Tailwind components on bits-ui.

## Looks that pick it

[Minimalfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/minimal)[Corporate / dashboardfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/corporate)[Technical / dev-toolfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/technical)[Fluentfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/fluent)[Bento gridfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/bento-grid)[Modular gridfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/modular-grid)[Flat designfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/flat-design)[Material Design 2first pick](https://tastebase.ehsanulsiam.workers.dev/looks/material-design)[Document / Notion-likefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/document)[Fintechfirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/fintech)[Healthcarefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/healthcare)[Civic / public servicefirst pick](https://tastebase.ehsanulsiam.workers.dev/looks/civic)[and 7 more](https://tastebase.ehsanulsiam.workers.dev/looks)

## For your agent

##### Install

`npm i @tanstack/react-table`

##### Use it for

- a sortable, filterable data table styled by your own kit (shadcn-ui's Data Table is built on it)
- an admin list with server-side pagination, sorting and filters driven by your API
- row selection with bulk actions, column visibility toggles and pinned columns

##### Skip it when

- a spreadsheet-like grid with cell editing and keyboard navigation out of the box: use ag-grid
- a short static table of a few rows: use a plain table or your kit's Table part

##### What's inside17 free

- Sorting
- Column Filtering
- Global Filtering
- Column Faceting
- Pagination
- Row Selection
- Row Expanding
- Row Pinning
- Column Pinning
- Column Ordering
- Column Sizing
- Column Resizing
- Column Visibility
- Grouping
- Aggregation
- Cell Selection
- Cell Spanning

##### Facts

**Frameworks**
react, vue, svelte, solid, angular, vanilla

**Styling**
unstyled

**Weight**
small

**Accessibility**
n/a

**Maturity**
established

**License**
MIT

**Price**
Free

##### Pairs with

[shadcn/ui](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-ui)[shadcn-vue](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-vue)[shadcn-svelte](https://tastebase.ehsanulsiam.workers.dev/browse/shadcn-svelte)

##### Alternatives

[AG Grid](https://tastebase.ehsanulsiam.workers.dev/browse/ag-grid)

```
import { createColumnHelper, createSortedRowModel, rowSortingFeature, sortFn_alphanumeric, tableFeatures, useTable } from "@tanstack/react-table"

const features = tableFeatures({ rowSortingFeature, sortedRowModel: createSortedRowModel(), sortFns: { alphanumeric: sortFn_alphanumeric } })
const col = createColumnHelper<typeof features, User>()
const columns = col.columns([col.accessor("name", { header: "Name" }), col.accessor("email", { header: "Email" })])

const table = useTable({ features, columns, data })
// <th onClick={header.column.getToggleSortingHandler()}><table.FlexRender header={header} /></th>
// rows: table.getRowModel().rows, cells: <table.FlexRender cell={cell} />
```

https://tanstack.com/table

This site doesn't allow being shown inside another page. Here is how it looks.

[Open in a new tab](https://tanstack.com/table?utm_source=tastebase&utm_medium=referral&utm_content=detail-preview)

[Visit](https://tanstack.com/table?utm_source=tastebase&utm_medium=referral&utm_content=floating-pill)
