Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
D

data-table-filters

> 前端框架
Open source

Faceted filters, sorting & infinite scroll for React data tables - shadcn/ui + TanStack Table

2.2K stars0 likes1 views
WebsiteGitHub

About

Faceted filters, sorting & infinite scroll for React data tables - shadcn/ui + TanStack Table

data-table-filters

Data tables for React and shadcn/ui: faceted filters, sorting, infinite scroll, and a row detail sheet. Installed as source with the shadcn CLI, so the code is yours to change.

One createTableSchema definition drives the columns, the filter controls, the row sheet, the Drizzle route handler, and the MCP tool schema. When the rows live in Postgres, filtering, faceted counts, and cursor pagination run in SQL. Built for the openstatus dashboard and used there in production.

Visit data-table.openstatus.dev to learn more. Read the Docs for full documentation.

Install

— the Quick Start below is installed into a fresh Next.js app on each shadcn library, Base UI and Radix, and typechecked nightly against the latest shadcn CLI.

Prerequisite. Works on either shadcn library: the CLI default, Base UI (npx shadcn@latest init -d), or Radix (npx shadcn@latest init -b radix -p nova). CI installs into both and typechecks them on every registry change and nightly.

One command installs the core block and the schema system:

bash
npx shadcn@latest add https://data-table.openstatus.dev/r/data-table.json https://data-table.openstatus.dev/r/data-table-schema.json

Then render a table from any array of objects — columns, filters, and cell renderers are inferred:

typescript
import { DataTableAuto } from "@/components/data-table/data-table-auto";

const data = [
  {
    name: "Alice",
    role: "admin",
    rating: 5,
    created_at: "2026-01-15T10:00:00Z",
  },
  { name: "Bob", role: "user", rating: 3, created_at: "2026-02-20T14:30:00Z" },
];

export default function Page() {
  return <DataTableAuto data={data} />;
}

Starting from nothing? One command creates the Next.js app, initializes shadcn, and installs a working example with every block it needs (add -b radix before -p nova for Radix). Run cd my-app && npm run dev and open localhost:3000/example:

bash
npx shadcn@latest init https://data-table.openstatus.dev/r/data-table-example-infinite.json --name my-app --template next -p nova

From create-next-app to a green next build this takes about 30 seconds on a clean machine. See the Quick Start for the full walkthrough, and add any block below as you need it.

Block Install URL What it adds
data-table .../r/data-table.json Core: table engine, store, 4 filter types, memory adapter
data-table-filter-command .../r/data-table-filter-command.json Command palette with history + keyboard shortcuts
data-table-cell .../r/data-table-cell.json 12 cell renderers (text, code, number, bar, heatmap, gauge, badge, boolean, star, status-code, level-indicator, timestamp)
data-table-sheet .../r/data-table-sheet.json Row detail side panel
data-table-nuqs .../r/data-table-nuqs.json nuqs URL state adapter
data-table-zustand .../r/data-table-zustand.json zustand state adapter
data-table-schema .../r/data-table-schema.json Declarative schema system with col.* factories
data-table-drizzle .../r/data-table-drizzle.json Drizzle ORM server-side helpers
data-table-query .../r/data-table-query.json React Query infinite query integration
data-table-filter-command-ai .../r/data-table-filter-command-ai.json AI-powered natural language → filter inference
data-table-mcp .../r/data-table-mcp.json MCP server endpoint for AI agents
data-table-actions .../r/data-table-actions.json Row and bulk actions rendered from server metadata
data-table-remote .../r/data-table-remote.json Headless table that renders from an API endpoint's manifest
data-table-chart .../r/data-table-chart.json Timeline chart over the table: stacked buckets per level, drag to zoom the time filter
data-table-example-infinite .../r/data-table-example-infinite.json Ready-to-run /example route: schema, mock API, infinite table with URL state

All URLs use base https://data-table.openstatus.dev.

For AI Agents

Install the plugin in Claude Code:

bash
/plugin marketplace add openstatushq/data-table-filters
/plugin install data-table-filters@openstatus

Or install the skill with any agent that supports the skills CLI:

bash
npx skills add https://github.com/openstatushq/data-table-filters --skill data-table-filters

Then just say "add a filterable data table" — the skill detects your stack, installs the right blocks, generates a schema, and wires everything up.

Or point any MCP client at the docs and let the agent ask them questions — search_docs, get_doc, list_blocks, get_install_plan:

bash
claude mcp add --transport http data-table-filters https://data-table.openstatus.dev/api/mcp

Machine-readable docs, for agents without the skill:

Endpoint What it is
/api/mcp These docs as an MCP server (Streamable HTTP)
/llms.txt Index: blocks, install recipes, docs links
/llms-full.txt Every documentation page in one file
/r/index.md Block catalog with install commands and dependencies
/docs/<page>.md Any docs page as raw markdown

Cursor users can copy .cursor/rules/data-table-filters.mdc into their project; AGENTS.md covers every other agent. See the For AI Agents docs page for the full rundown.

Table Schema

Define your entire table — columns, filters, display, sorting, row details — in one place with createTableSchema and col.* factories.

…

Generators produce everything the table components need from a single schema:

typescript
const columns = generateColumns<ColumnSchema>(tableSchema.definition);
const filterFields = generateFilterFields<ColumnSchema>(tableSchema.definition);
const sheetFields = generateSheetFields<ColumnSchema>(tableSchema.definition);

Presets cover common patterns: logLevel, httpStatus, httpMethod, duration, timestamp, traceId, pathname.

Examples

  • /default — client-side pagination (nuqs or zustand)
  • /infinite — infinite scroll with server-side filtering, live mode, row details
  • /drizzle — Drizzle ORM + Supabase PostgreSQL with cursor-based pagination, faceted search, and live data via Vercel cron
  • /light — OpenStatus Light Viewer (UI for vercel-edge-ping)
  • /builder — interactive schema builder (paste JSON/CSV, live table preview, export TS)

BYOS (Bring Your Own Store)

A pluggable adapter pattern for filter state management. Three built-in adapters:

  • nuqs — URL-based state (shareable URLs, browser history)
  • zustand — client-side state (existing store integration)
  • memory — ephemeral in-memory state (embedded tables, builder)

Or implement the StoreAdapter interface for a custom solution. See the Docs for details.

Built With

  • nextjs
  • tanstack-query
  • tanstack-table
  • shadcn/ui
  • cmdk
  • nuqs
  • zustand
  • drizzle-orm
  • zod
  • superjson
  • date-fns
  • recharts
  • dnd-kit

Getting Started

No environment variable required for the default examples. For the Drizzle example, set DATABASE_URL to a PostgreSQL connection string.

bash
pnpm install
pnpm dev

Open http://localhost:3000 with your browser to see the result.

Want more?

If you are looking for specific use-cases or like what we are building and want to hire us, feel free write us to [email protected] or book a call via cal.com.

Credits

  • sadmann17 for the dope <Sortable /> component around @dnd-kit (see sortable.sadmn.com)
  • shelwin_ for the draggable chart inspiration (see zoom-chart-demo.vercel.app)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

TypeScriptcmdkdata-tablenextjsnuqs

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category前端框架
PricingOpen source

> Related tools

R
React
用于构建用户界面的 JavaScript 库
V
Vue.js
渐进式 JavaScript 框架
N
Next.js
基于 React 的全栈 Web 框架