Shadcn-Compatible React Data Table
Composable, accessible data tables with thoughtful defaults. Sorting, filters, virtualization and more, in code you copy, customize and own.
Hold Shift and click a column's sort to sort by more than one column.
Search, column filters, sorting, a column view menu and pagination, composed from small pieces.
All table examplesStress test:
Paste a spreadsheet (Ctrl/Cmd+V) to fill rows
Click a cell to edit. Move with the keyboard, paste from a spreadsheet, undo and redo.
All grid examplesInstall
Section titled “Install”Nobody’s table, everyone’s solution.
This is not an npm package. The CLI copies the DataTable source into your project, so you own it. It is built with TanStack Table and shadcn/ui.
Add the registry once under registries in components.json, then install:
{ "registries": { "@niko-table": "https://niko-table.com/r/{style}/{name}.json" }}pnpm dlx shadcn@latest add @niko-table/data-tableWorks with Radix UI, Base UI and React Aria. Like shadcn/ui, the CLI installs the version that matches your project.
See Installation to add it to an existing components.json.
Quick Links
Section titled “Quick Links”Getting Started
Section titled “Getting Started”- Introduction - How it is built and why
- Installation - Set up your project
- Manual Installation - Copy the files by hand
Examples
Section titled “Examples”- Simple Table - Basic rendering
- Basic Table - Pagination and sorting
- Search Table - Add global search
- Faceted Filter Table - Column-specific filters
- Virtualization Table - 100,000+ rows with virtual scrolling
- Row Context Menu Table - Shared kebab and right-click actions
- Advanced Table - All features together
- Advanced Nuqs Table - Table state saved in the URL
- Server-Side Table - Pagination, sorting and filters on the server
- Server-Side Nuqs Table - Server-side table with state in the URL
- Drizzle ORM - Server-side data contract with Drizzle and Postgres
- Drizzle ORM + Nuqs - Drizzle backend with shareable URL state
Niko Grid
Section titled “Niko Grid”- Introduction - The editable spreadsheet grid
- Cell Types - Text, number, currency, checkbox, date and select editors
- Validation - Per-cell errors with Zod (or any
resolve) - Dynamic Columns - Add, rename, move, delete and retype columns at runtime
- Persistence - Track creates, updates and deletes with
useGridChanges - API Reference - Every hook, component and type
Key Features
Section titled “Key Features”- Type-safe - Full TypeScript support
- Accessible - Built on shadcn/ui primitives (Radix or Base UI). Filters and menus have ARIA labels and keyboard shortcuts. Code is linted with jsx-a11y.
- Responsive - Full-width scroll container (
overflow-auto) and touch-friendly controls. Stack toolbars on small screens as needed. - Customizable - You own the source code
- Composable - Mix and match
DataTable*components. Install only the pieces you need. TanStack Table v9 works the same way: register only the features you use inlib/data-table-features.ts. - Built from shadcn/ui - Every component reuses the shadcn/ui components already in your project (Button, Popover, Command, Dropdown Menu and more), so tables match your theme with no extra styling.
- Performance - Virtual scrolling keeps hundreds of thousands of client-side rows smooth. The Niko Grid stress test loads 500,000 rows in the browser.
- State Management -
useDataTable()reads state from context. State can be controlled, and can sync to the URL with nuqs.
Built With
Section titled “Built With”- TanStack Table - Headless table logic
- Shadcn UI - UI components
- Tailwind CSS - Utility CSS
- Radix UI / Base UI - Accessible primitives (the one your shadcn style uses)
- DiceUI Sortable - Drag and drop sorting
Community
Section titled “Community”Questions or want to help?
License
Section titled “License”MIT License. Use it in your projects.