data-table-filters
Install and extend data-table-filters — a React data table system with faceted filters (checkbox, input, slider, timerange), sorting, infinite scroll, virtualization, and BYOS state management. Delivered as 9 shadcn registry blocks installable via `npx shadcn@latest add`. Use when: (1) installing data-table-filters from the shadcn registry, (2) adding extension blocks (command palette, cell renderers, sheet panel, store adapters, schema system, Drizzle helpers, query layer), (3) configuring store adapters (nuqs/zustand/memory), (4) generating table schemas from a data model, (5) wiring up server-side filtering with Drizzle ORM, (6) connecting the React Query fetch layer, (7) troubleshooting integration issues. Triggers on mentions of "data-table-filters", "data-table.openstatus.dev", filterable data tables with shadcn, or any of the registry block names.
NPX Install
npx skill4agent add openstatushq/data-table-filters data-table-filtersTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Data Table Filters
Registry Blocks
npx shadcn@latest add <url>| Block | Install URL | What it adds |
|---|---|---|
| data-table | | Core: table engine, store, 4 filter types, memory adapter (~52 files) |
| data-table-filter-command | | Command palette with history + keyboard shortcuts |
| data-table-cell | | 8 cell renderers (text, code, badge, boolean, number, status-code, level-indicator, timestamp) |
| data-table-sheet | | Row detail side panel (auto-installs cells) |
| data-table-nuqs | | nuqs URL state adapter |
| data-table-zustand | | zustand state adapter |
| data-table-schema | | Declarative schema system with |
| data-table-drizzle | | Drizzle ORM server-side helpers (auto-installs schema) |
| data-table-query | | React Query infinite query integration |
https://data-table.openstatus.devQuick Start
- Run to detect the user's project setup
scripts/detect-stack.sh - Install core:
npx shadcn@latest add https://data-table.openstatus.dev/r/data-table.json - Scaffold a minimal working table (see below)
- Extend with additional blocks as needed
Next.js? Use the data-table-filters repo as a reference — it's a full Next.js app with all blocks wired up.
Minimal Working Table (Memory Adapter)
Note:internally rendersDataTableInfinite, which already wraps children withDataTableProviderandControlsProvider. You do NOT need to add these separately. The only wrapper you need isDataTableStoreSync(for the BYOS adapter).DataTableStoreProvider
"use client";
import { DataTableInfinite } from "@/components/data-table/data-table-infinite";
import type { DataTableFilterField } from "@/components/data-table/types";
import { useMemoryAdapter } from "@/lib/store/adapters/memory";
import { DataTableStoreProvider } from "@/lib/store/provider/DataTableStoreProvider";
import type { ColumnDef } from "@tanstack/react-table";
const columns: ColumnDef<YourData>[] = [
/* user's columns */
];
const filterFields: DataTableFilterField<YourData>[] = [
/* user's filters */
];
export function MyTable({ data }: { data: YourData[] }) {
const adapter = useMemoryAdapter(/* schema definition */);
return (
<DataTableStoreProvider adapter={adapter}>
<DataTableInfinite
columns={columns}
data={data}
filterFields={filterFields}
/>
</DataTableStoreProvider>
);
}Wiring Extension Blocks
npx shadcn@latest addCommand Palette → commandSlot
commandSlot<DataTableInfinite
commandSlot={<DataTableFilterCommand schema={schema} tableId="my-table" />}
/>Sheet Detail Panel → sheetSlot
sheetSlot<DataTableInfinite
sheetSlot={
<DataTableSheetDetails title="Details">{content}</DataTableSheetDetails>
}
/>Cell Renderers → column definitions
import { DataTableCellBadge } from "@/components/data-table/data-table-cell";
// Use in columnDef.cellCustom Filter Types → FILTER_COMPONENTS
FILTER_COMPONENTSimport { FILTER_COMPONENTS } from "@/components/data-table/data-table-filter-controls";
FILTER_COMPONENTS.myCustom = MyCustomFilterComponent;All Slot Props
DataTableInfinitecommandSlotsheetSlottoolbarActionschartSlotfooterSlotStore Adapter Configuration
- memory (default) — Ephemeral, zero config. For prototyping, embedded components, builders.
- nuqs — URL state. Shareable links, bookmarkable filters. Requires framework setup.
- zustand — Client state. For existing zustand apps, complex app state.
Schema Generation
npx shadcn@latest add .../r/data-table-schema.jsoncreateTableSchemacol.*- →
stringcol.string().filterable("input") - →
numbercol.number().filterable("slider", { min, max }) - →
booleancol.boolean().filterable("checkbox") - →
Datecol.timestamp().filterable("timerange") - →
enumcol.enum(values).filterable("checkbox")
col.presets.logLevel().httpStatus().duration().timestamp().traceId().pathname().httpMethod()Server-Side Integration
npx shadcn@latest add .../r/data-table-drizzle.jsoncreateDrizzleHandler({ db, table, columnMapping, cursorColumn, schema }){ data, facets, totalRowCount, filterRowCount, nextCursor, prevCursor }Fetch Layer
npx shadcn@latest add .../r/data-table-query.jsoncreateDataTableQueryOptions({ queryKeyPrefix, apiEndpoint, searchParamsSerializer })Troubleshooting
- Missing CSS vars: Core injects . Check cssVars applied to CSS.
--color-success/warning/error/info - Import path mismatches: shadcn CLI rewrites paths per
@/aliases.components.json - nuqs: silent failure or crash: Two required setup steps — in root layout AND
<NuqsAdapter>around the table component. See references/store-adapters.md.<Suspense> - nuqs: filters not applied from URL on load: Pass server-parsed search params as to the nuqs adapter. See the SSR Hydration section in references/store-adapters.md.
initialState - nuqs: phantom filters with empty string: Use (null default), not
field.string().field.string().default("") - Sheet dropdown missing: must match the filter type (not
SheetField.type) to get the filter dropdown. Use"readonly"to auto-derive from filter config.generateSheetFields() - Filter not rendering: Verify filter type string matches key.
FILTER_COMPONENTS - Tailwind v4: Registry targets v4. Class syntax differs from v3.