React installation
Recommended — shadcn CLI
From any shadcn-enabled app:
bunx shadcn@latest add https://raw.githubusercontent.com/izetmolla/datatable/main/registry/v1.json
Or:
bunx shadcn@latest add izetmolla/datatable/datatable
Full guide: Install with shadcn CLI.
Monorepo / Admin Console
Source of truth in Flowtrove:
backend/apps/admin-console/frontend/src/components/datatable
Published copy for the GitHub registry:
backend/pkg/datatable/ui/datatable
import {
DataTable,
useBackendColumns,
useServerTableData,
setDatatableFetcher,
type BackendColumnsResponse,
} from "@/components/datatable";
Peer stack
| Library | Role |
|---|---|
@tanstack/react-table | Table model |
@tanstack/react-query | Server list fetching |
nuqs | URL query state |
| shadcn UI | table, checkbox, inputs, popovers, … |
Providers
- React Query
QueryClientProvider - nuqs adapter for your router
Optional: setDatatableFetcher for authenticated async filter requests.