RepositoryTypeScriptCACanada
Semkoo

Semkoo/niko-table-registry

Composable, accessible React data tables for shadcn/ui, built on TanStack Table. Sorting, filters, editable grid and virtualization for 500,000+ rows, in code you own.

72stars
4forks
0issues
0views

Featured achievements

The project's latest awards

6
TINIX TRENDING·Country: CA

#6 Repository of the month

Niko Table

Nobody's table, everyone's solution.

A comprehensive, production-ready DataTable component built with TanStack Table and Shadcn UI. Copy the code into your project, customize it to your needs, and ship with confidence.

This is not a component library you install. It's open code you own.

Principles

Niko Table is built around the following principles:

Open Code: The top layer of your component code is open for modification. You get the full source code — not a black box. Modify any component, change any behavior, style anything your way.

Composition: Every table is built by composing small, predictable components. Start with DataTableRoot, add DataTableHeader, DataTableBody, filters, pagination — mix and match to build exactly what you need.

Distribution: A flat-file schema and the shadcn CLI make it easy to add components to your project. Run one command and you're ready to go.

Beautiful Defaults: Carefully chosen default styles powered by Shadcn UI and Tailwind CSS, so you get great design out-of-the-box without any configuration.

AI-Ready: Open code that LLMs can read, understand, and improve. No hidden abstractions, no private APIs — just clean, well-documented TypeScript.

Features

  • Sorting — Single and multi-column sorting with drag-and-drop reordering
  • Filtering — Global search, faceted filters, date filters, slider filters, inline filters with AND/OR logic
  • Pagination — Client-side and server-side with customizable page sizes
  • Row Selection — Individual and bulk selection with action bar
  • Row Expansion — Expandable rows with custom detail views
  • Column Pinning — Pin columns to left or right edges
  • Column Visibility — Show/hide columns dynamically
  • Virtual Scrolling — Handle 10,000+ rows with smooth performance
  • Export — Export all or selected rows to CSV
  • URL State — Persist table state in the URL with nuqs
  • Server-Side — Full support for server-side pagination, filtering, and sorting
  • Tree Tables — Hierarchical data with expandable parent rows
  • Sidebar Panels — Left and right aside panels for filters or detail views
  • Composable Column Headers — Build custom column headers with sort, filter, pin, and hide controls
  • Empty States — Composable empty state with filtered/unfiltered messaging
  • Type-Safe — Full TypeScript support with comprehensive type definitions
  • Accessible — Radix UI primitives, ARIA in filters/menus, keyboard shortcuts; jsx-a11y in this repo (verify in your app for full conformance)
  • Responsive — Mobile-friendly design with touch-friendly controls

Quick Start

Add the registry to your project's components.json:

{
  "registries": {
    "@niko-table": "https://niko-table.com/r/{name}.json"
  }
}

Then install the core (or any add-on — see Components):

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

URL fallback (no components.json change):

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

This copies the DataTable source into your project. You own the code. The CLI does not support wildcards like @niko-table/** — list items explicitly or use Install Everything.

Manual Installation

Copy the component files from src/components/niko-table/ into your project. See the Manual Installation Guide for details.

Required Dependencies

npm install @tanstack/react-table

Optional dependencies for advanced features:

# Virtual scrolling
npm install @tanstack/react-virtual

# URL state management
npm install nuqs

# Drag and drop sorting
npm install @dnd-kit/core @dnd-kit/sortable @dnd-kit/modifiers @dnd-kit/utilities

Usage

Simple Table

import {
  DataTableRoot,
  DataTable,
  DataTableHeader,
  DataTableBody,
} from "@/components/niko-table/core"

const columns = [
  { accessorKey: "name", header: "Name" },
  { accessorKey: "email", header: "Email" },
]

export function SimpleTable({ data }) {
  return (
    <DataTableRoot data={data} columns={columns}>
      <DataTable>
        <DataTableHeader />
        <DataTableBody />
      </DataTable>
    </DataTableRoot>
  )
}

Add Features Incrementally

import {
  DataTableRoot,
  DataTable,
  DataTableHeader,
  DataTableBody,
} from "@/components/niko-table/core"
import {
  DataTableToolbarSection,
  DataTableSearchFilter,
  DataTableFilterMenu,
  DataTableViewMenu,
  DataTableSortMenu,
  DataTablePagination,
} from "@/components/niko-table/components"

export function AdvancedTable({ data, columns }) {
  return (
    <DataTableRoot
      data={data}
      columns={columns}
      config={{
        enablePagination: true,
        enableFilters: true,
      }}
    >
      <DataTableToolbarSection className="justify-between">
        <div className="flex gap-2">
          <DataTableSearchFilter />
          <DataTableFilterMenu />
        </div>
        <div className="flex gap-2">
          <DataTableViewMenu />
          <DataTableSortMenu />
        </div>
      </DataTableToolbarSection>

      <DataTable>
        <DataTableHeader />
        <DataTableBody />
      </DataTable>

      <DataTablePagination />
    </DataTableRoot>
  )
}

Architecture

Niko Table uses a two-layer architecture for maximum flexibility:

Components (/components/) — Context-aware wrappers that use useDataTable() to automatically get the table instance from DataTableRoot. Zero prop drilling, recommended for most use cases.

<DataTableSearchFilter /> // Automatically connected via context

Filters (/filters/) — Core implementations that accept a table prop directly. Use these when building custom components or managing the table instance yourself.

<TableSearchFilter table={table} /> // Direct table prop
niko-table/
├── core/          # DataTableRoot, context, structure
├── components/    # Context-aware components (DataTable*, column headers, empty states)
├── filters/       # Core filter implementations (Table*)
├── hooks/         # Custom React hooks
├── config/        # Feature detection and configuration
├── lib/           # Utilities, constants, formatting
└── types/         # TypeScript type definitions

Documentation

Full documentation with interactive examples is available at niko-table.com.

Development

Prerequisites

  • Node.js 22+ (see .nvmrc)
  • pnpm (recommended) or npm

Setup

git clone https://github.com/Semkoo/niko-table-registry.git
cd niko-table-registry
pnpm install
cp .env.example .env
pnpm dev

The documentation site will be available at http://localhost:4321.

Build the Registry

pnpm registry:build

Test installing a component from your local registry:

npx shadcn@latest add http://localhost:4321/r/data-table.json

Contributing

We welcome contributions! Please read the Contributing Guide before submitting a pull request.

Credits

Built on top of excellent open-source work:

  • TanStack Table by Tanner Linsley — The headless table library that powers everything
  • Shadcn UI by Shadcn — Beautiful, accessible component primitives
  • sadmann7 — Major inspiration for filter components and table patterns:
    • TableCN — Inspired filter menu, inline filter, faceted filter, and slider filter
    • DiceUI Sortable — Drag and drop sortable for row reordering
  • nuqs by François Best — Type-safe search params state manager
  • Web Dev Simplified Registry by Kyle Cook — Registry implementation pattern

License

Licensed under the MIT License.

Similar Projects

Discover other similar projects and AI models.

RepositoryTypeScript
sadmann7/tablecn

Data table and data grid components built with shadcn/ui, featuring sorting, filtering, pagination, infinite scrolling, and real-time collaboration.

6.4k
Nov 30, 2026
RepositoryTypeScript
1771-Technologies/lytenyte

LyteNyte Grid monorepo: Build powerful data tables with a lightning-fast, zero-dependency React data grid (~40 KB). Headless or pre-styled. Declarative API. 150+ enterprise-grade features. Supported by 1771 Technologies.

1.0k
Aug 15, 2026
RepositoryTypeScript
ncdai/chanhdai.com

A pixel-perfect dev portfolio and shadcn registry.

2.4k
Nov 30, 2026
RepositoryTypeScript
Monabbir-Ahmmad/shadcn-react-table

A shadcn/ui data table with Material React Table feature parity, built on TanStack Table v9 and Tailwind v4 — installed as source you own via the shadcn registry

51
Nov 23, 2026
RepositoryJavaScript
table-library/react-table-library

React Table Library

795
Mar 15, 2026
RepositorySvelte
svar-widgets/grid

Svelte datagrid component. Lightweight, fast, feature-rich.

229
Nov 7, 2026
RepositoryTypeScript
shadcn-ui/ui

Composable, accessible components with thoughtful defaults. Build your own component library with code you can customize, extend, and make your own.

129.8k
Dec 2, 2026
RepositoryTypeScript
TanStack/table

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table

28.7k
Nov 24, 2026
RepositoryTypeScript
handsontable/handsontable

JavaScript Data Grid / Data Table with a Spreadsheet Look & Feel. Works with React, Angular, and Vue. Supported by the Handsontable team ⚡

22.1k
Nov 25, 2026