Loading...
Loading...
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 skill4agent add openstatushq/data-table-filters data-table-filtersnpx 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.devscripts/detect-stack.shnpx shadcn@latest add https://data-table.openstatus.dev/r/data-table.jsonNext.js? Use the data-table-filters repo as a reference — it's a full Next.js app with all blocks wired up.
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>
);
}npx shadcn@latest addcommandSlot<DataTableInfinite
commandSlot={<DataTableFilterCommand schema={schema} tableId="my-table" />}
/>sheetSlot<DataTableInfinite
sheetSlot={
<DataTableSheetDetails title="Details">{content}</DataTableSheetDetails>
}
/>import { DataTableCellBadge } from "@/components/data-table/data-table-cell";
// Use in columnDef.cellFILTER_COMPONENTSimport { FILTER_COMPONENTS } from "@/components/data-table/data-table-filter-controls";
FILTER_COMPONENTS.myCustom = MyCustomFilterComponent;DataTableInfinitecommandSlotsheetSlottoolbarActionschartSlotfooterSlotnpx 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()npx shadcn@latest add .../r/data-table-drizzle.jsoncreateDrizzleHandler({ db, table, columnMapping, cursorColumn, schema }){ data, facets, totalRowCount, filterRowCount, nextCursor, prevCursor }npx shadcn@latest add .../r/data-table-query.jsoncreateDataTableQueryOptions({ queryKeyPrefix, apiEndpoint, searchParamsSerializer })--color-success/warning/error/info@/components.json<NuqsAdapter><Suspense>initialStatefield.string()field.string().default("")SheetField.type"readonly"generateSheetFields()FILTER_COMPONENTS