Skip to content

Installation

Install Niko Table with the shadcn CLI—add @niko-table/data-table and optional registry components to your React + TanStack Table project.

Before installing the DataTable component, make sure you have:

  1. A React project (Next.js, Vite, etc.)
  2. Shadcn UI set up in your project (Installation Guide) — both the Radix (new-york) and Base UI (base-nova) generations are supported
  3. TailwindCSS configured
  4. TypeScript (recommended)

Works with both shadcn generations. Niko Table installs cleanly whether your components.json style is the classic Radix generation ("new-york") or the newer Base UI generation ("base-nova", the current shadcn init default). The source is written to typecheck against both: the shadcn CLI adapts Radix idioms (asChildrender) during install, and Niko Table’s callbacks and props are dual-generation safe. If you hit a type error after install, make sure you’re on a recent shadcn CLI and re-add the block with --overwrite.

To use the @niko-table/ namespace with the shadcn CLI, you must first register it in your project’s components.json. Add the registries field:

components.json
{
"$schema": "https://ui.shadcn.com/schema.json",
// ... your existing config (style, tailwind, aliases, etc.)
"registries": {
"@niko-table": "https://niko-table.com/r/{name}.json"
}
}

Tip: If you prefer not to modify components.json, you can install any component directly via URL instead – see the URL-based commands in each section below.

Install in two steps (or all at once):

  1. Install the core once — one command copies the base table (Root, DataTable, context, structure, column header, empty state, hooks, lib, types) into your project.
  2. Add features one by one — run the CLI for each feature you need (pagination, search filter, DnD, etc.). Each add-on depends on the core, so the CLI will install or reuse it.

Now install the core:

pnpm dlx shadcn@latest add @niko-table/data-table

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table.json"

This installs only the core. For pagination, filters, DnD, virtualization, aside, and other features, add the optional blocks below (one by one) or use Install Everything.

Want every registry item at once? List them explicitly — the shadcn CLI does not support wildcards like @niko-table/**. Prefer installing only what you need (see Components); reach for this when you want the full set.

pnpm dlx shadcn@latest add @niko-table/data-table @niko-table/data-table-virtualized @niko-table/data-table-pagination @niko-table/data-table-search-filter @niko-table/data-table-sort-menu @niko-table/data-table-view-menu @niko-table/data-table-view-dnd-menu @niko-table/data-table-clear-filter @niko-table/data-table-filter-menu @niko-table/data-table-faceted-filter @niko-table/data-table-inline-filter @niko-table/data-table-slider-filter @niko-table/data-table-date-filter @niko-table/data-table-export-button @niko-table/data-table-aside @niko-table/data-table-selection-bar @niko-table/data-table-column-sort @niko-table/data-table-column-hide @niko-table/data-table-column-pin @niko-table/data-table-column-resize @niko-table/data-table-column-auto-fit @niko-table/data-table-column-sizing-persistence @niko-table/data-table-column-faceted-filter @niko-table/data-table-column-slider-filter @niko-table/data-table-column-date-filter @niko-table/data-table-row-dnd @niko-table/data-table-column-dnd @niko-table/data-table-virtualized-row-dnd @niko-table/data-table-virtualized-column-dnd @niko-table/data-table-grid @niko-table/data-table-grid-changes

You can also browse / filter the registry with:

npx shadcn@latest search @niko-table

If you prefer not to configure the registry, pass full URLs instead:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table.json" "https://niko-table.com/r/data-table-virtualized.json" "https://niko-table.com/r/data-table-pagination.json" "https://niko-table.com/r/data-table-search-filter.json" "https://niko-table.com/r/data-table-sort-menu.json" "https://niko-table.com/r/data-table-view-menu.json" "https://niko-table.com/r/data-table-view-dnd-menu.json" "https://niko-table.com/r/data-table-clear-filter.json" "https://niko-table.com/r/data-table-filter-menu.json" "https://niko-table.com/r/data-table-faceted-filter.json" "https://niko-table.com/r/data-table-inline-filter.json" "https://niko-table.com/r/data-table-slider-filter.json" "https://niko-table.com/r/data-table-date-filter.json" "https://niko-table.com/r/data-table-export-button.json" "https://niko-table.com/r/data-table-aside.json" "https://niko-table.com/r/data-table-selection-bar.json" "https://niko-table.com/r/data-table-column-sort.json" "https://niko-table.com/r/data-table-column-hide.json" "https://niko-table.com/r/data-table-column-pin.json" "https://niko-table.com/r/data-table-column-resize.json" "https://niko-table.com/r/data-table-column-auto-fit.json" "https://niko-table.com/r/data-table-column-sizing-persistence.json" "https://niko-table.com/r/data-table-column-faceted-filter.json" "https://niko-table.com/r/data-table-column-slider-filter.json" "https://niko-table.com/r/data-table-column-date-filter.json" "https://niko-table.com/r/data-table-row-dnd.json" "https://niko-table.com/r/data-table-column-dnd.json" "https://niko-table.com/r/data-table-virtualized-row-dnd.json" "https://niko-table.com/r/data-table-virtualized-column-dnd.json" "https://niko-table.com/r/data-table-grid.json" "https://niko-table.com/r/data-table-grid-changes.json"

Or install only the components you need. Each component can be added individually:

DataTablePagination:

pnpm dlx shadcn@latest add @niko-table/data-table-pagination

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-pagination.json"

DataTableSearchFilter:

pnpm dlx shadcn@latest add @niko-table/data-table-search-filter

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-search-filter.json"

DataTableSortMenu:

pnpm dlx shadcn@latest add @niko-table/data-table-sort-menu

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-sort-menu.json"

DataTableViewMenu:

pnpm dlx shadcn@latest add @niko-table/data-table-view-menu

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-view-menu.json"

DataTableViewDndMenu (column visibility + drag-to-reorder):

pnpm dlx shadcn@latest add @niko-table/data-table-view-dnd-menu

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-view-dnd-menu.json"

DataTableClearFilter:

pnpm dlx shadcn@latest add @niko-table/data-table-clear-filter

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-clear-filter.json"

DataTableExportButton:

pnpm dlx shadcn@latest add @niko-table/data-table-export-button

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-export-button.json"

DataTableFilterMenu:

pnpm dlx shadcn@latest add @niko-table/data-table-filter-menu

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-filter-menu.json"

DataTableFacetedFilter:

pnpm dlx shadcn@latest add @niko-table/data-table-faceted-filter

Requires the @niko-table registry in your components.json. See the Installation Guide for setup. Or install directly via URL:

pnpm dlx shadcn@latest add "https://niko-table.com/r/data-table-faceted-filter.json"