Why data-table-filters?
- One schema, everything generated. A single
createTableSchema definition drives the columns, filter controls, row detail sheet, Drizzle route handler, and MCP tool schema.
- Filtering that scales. Faceted filters (checkbox, input, slider, timerange), sorting, infinite scroll, and virtualization. With Postgres, filtering, facet counts, and cursor pagination run in SQL.
- You own the code. Blocks install as source through the shadcn CLI, so you change what you need. Works with both Base UI and Radix.
- Bring your own store. Keep filter state in the URL (nuqs), zustand, memory, or your own adapter.
- AI-ready. Natural-language filtering, an MCP endpoint for agents, and a Claude Code plugin that sets the table up for you.
- Tested against the real CLI. CI installs the blocks into fresh Next.js apps and typechecks them on every registry change and nightly.
Quick Start
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 lyra). CI installs into both and typechecks them on every registry change and nightly.
One command installs the core block and the schema system:
npx shadcn@latest add @data-table-filters/data-table @data-table-filters/data-table-schema
Then render a table from any array of objects — columns, filters, and cell renderers are inferred:
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 lyra for Radix). Run cd logs-viewer && pnpm dev and open localhost:3000/example:
pnpm dlx shadcn@latest init @data-table-filters/data-table-example-infinite --name logs-viewer --template next -p lyra
Requires pnpm (npm i -g pnpm); npx and npm run dev work the same if you prefer npm.
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.
Blocks