tanstack-table
БесплатноБез исполняемых скриптовНе проверенTanStack Table is a headless table library for React, Vue, Svelte, Solid, Angular and Lit that handles sorting, filtering, pagination, row selection and…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
TanStack Table
Overview
TanStack Table is a headless table library: it manages table state and logic (sorting, filtering, pagination, selection, visibility, pinning, grouping) and you render every element yourself, so there are no built-in styles. The current release is v9 (@tanstack/react-table 9.3.x, October 2026), which changed the API from v8: features are opt-in and declared in tableFeatures(...), the hook is useTable (not useReactTable), and rendering uses table.FlexRender. v8 (8.21.3) still works if a project is pinned to it; check package.json before writing code, because the two APIs do not mix.
Instructions
Setup
npm install @tanstack/react-table # v9; use @tanstack/react-table@8 to stay on v8
Other adapters: @tanstack/vue-table, @tanstack/svelte-table (Svelte 5), @tanstack/solid-table, @tanstack/angular-table, @tanstack/lit-table.
The v9 model
- Declare
features = tableFeatures({ ... })once at module scope. Register each feature you use (rowSortingFeature,columnFilteringFeature,globalFilteringFeature,rowPaginationFeature,rowSelectionFeature,columnVisibilityFeature,columnResizingFeature,columnPinningFeature,columnOrderingFeature,rowExpandingFeature,columnGroupingFeature). - For client-side work also register the row model factory in the same object:
sortedRowModel: createSortedRowModel(),filteredRowModel: createFilteredRowModel(),paginatedRowModel: createPaginatedRowModel(). The core row model is automatic. Sorting needssortFns; filtering needs the filter functions you name infilterFns(for examplefilterFns: { includesString: filterFn_includesString }). - Type columns as
ColumnDef<typeof features, Row>. - Call
useTable({ features, columns, data, ... }, selector). Table state is only re-read in components through the optional selector (second argument);(state) => statesubscribes to all of it, then readtable.state.paginationand so on. - Render with
<table.FlexRender header={header} />and<table.FlexRender cell={cell} />.
Client-side table with search, sorting, pagination and selection
This code type-checks against 9.3.1 and renders with react-dom/server.
import { useState } from "react";
import {
columnFilteringFeature,
createFilteredRowModel,
createPaginatedRowModel,
createSortedRowModel,
filterFn_includesString,
globalFilteringFeature,
rowPaginationFeature,
rowSelectionFeature,
rowSortingFeature,
sortFns,
tableFeatures,
useTable,
} from "@tanstack/react-table";
import type { ColumnDef } from "@tanstack/react-table";
interface User {
id: number;
name: string;
email: string;
role: string;
status: "active" | "inactive";
joinedAt: string;
}
// v9: declare the features (and client-side row models) this table uses
const features = tableFeatures({
rowSortingFeature,
columnFilteringFeature,
globalFilteringFeature,
rowPaginationFeature,
rowSelectionFeature,
sortedRowModel: createSortedRowModel(),
filteredRowModel: createFilteredRowModel(),
paginatedRowModel: createPaginatedRowModel(),
sortFns,
filterFns: { includesString: filterFn_includesString },
});
const columns: ColumnDef<typeof features, User>[] = [
{
id: "select",
header: ({ table }) => (
<input
type="checkbox"
aria-label="Select all rows on this page"
checked={table.getIsAllPageRowsSelected()}
onChange={table.getToggleAllPageRowsSelectedHandler()}
/>
),
cell: ({ row }) => (
<input
type="checkbox"
aria-label={`Select ${row.original.name}`}
checked={row.getIsSelected()}
onChange={row.getToggleSelectedHandler()}
/>
),
},
{ accessorKey: "name", header: "Name" },
{ accessorKey: "email", header: "Email" },
{ accessorKey: "role", header: "Role" },
{
accessorKey: "status",
header: "Status",
cell: (info) => (
<span style={{ color: info.getValue() === "active" ? "green" : "gray" }}>
{info.getValue<string>()}
</span>
),
},
{
accessorKey: "joinedAt",
header: "Joined",
cell: (info) => new Date(info.getValue<string>()).toLocaleDateString("en-US"),
},
];
export function UsersTable({ data }: { data: User[] }) {
const [globalFilter, setGlobalFilter] = useState("");
const table = useTable(
{
features,
columns,
data, // keep this reference stable (state, query result, module constant)
getRowId: (row) => String(row.id), // selection state is keyed by row id
globalFilterFn: "includesString",
state: { globalFilter },
onGlobalFilterChange: setGlobalFilter,
initialState: { pagination: { pageIndex: 0, pageSize: 10 } },
},
// selector: the slices that should re-render this component
(state) => state,
);
return (
<div>
<input
value={globalFilter}
onChange={(e) => setGlobalFilter(e.target.value
Установить tanstack-table в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл tanstack-table?
TanStack Table is a headless table library for React, Vue, Svelte, Solid, Angular and Lit that handles sorting, filtering, pagination, row selection and column state while you write the markup. Use when someone asks to "build a data table", "TanStack Table", "sortable table", "filterable data grid", "paginated table", "server-side pagination", "React table", or "headless table library", or when migrating code from v8 `useReactTable`.
Как установить скилл tanstack-table?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл tanstack-table запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic