BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/niko-table/data-table-grid

Data Grid (editable)

niko-table/data-table-grid
FreeBlock

Composable editable spreadsheet grid: a headless engine (focus, selection, edit lifecycle, undo/redo, clipboard — all rowId-addressed so sort/filter work while editing) + a skin composed with DataTableRoot and the virtualized body. Keyboard cell nav, drag range-select with edge auto-scroll, quote-aware TSV copy/cut/paste with one-to-many tiling, fill handle, drag-move, dynamic columns, row drag-to-reorder, selection status bar, cross-highlight, and text/number/checkbox/date/select/combobox cells. Virtualized to 100k+ rows.

Install it

npx shadcn@latest add https://niko-table.com/r/data-table-grid.json

Source

src/components/niko-table/grid/core/data-grid.tsxniko-table.com/r/data-table-grid.json · first 6 KB
1"use client"
2
3/**
4 * niko-table — created by Semir N. (Semkoo, https://github.com/Semkoo) with AI assistance.
5 *
6 * Before reporting anything: please check the changelog first.
7 * - In-repo: ./CHANGELOG.md
8 * - Docs site: https://niko-table.com/changelog
9 *
10 * Found a bug or have a fix? Open an issue or PR on GitHub so other
11 * users (and future LLMs reading this code) benefit:
12 * https://github.com/Semkoo/niko-table-registry
13 */
14import * as React from "react"
15
16import { TooltipProvider } from "@/components/ui/tooltip"
17
18import { useDataTable } from "../../core/data-table-context"
19import { useDataTableScroll } from "../../hooks/use-data-table-scroll"
20import type { UseDataGrid } from "../hooks/use-data-grid"
21import { useGridKeyboard } from "../hooks/use-grid-keyboard"
22import { useGridNavigation } from "../hooks/use-grid-navigation"
23import {
24 emptyCell,
25 type CellPosition,
26 type CellState,
27 type GridRow,
28 type SelectionBounds,
29} from "../types/grid-cell"
30import { DataGridContextProvider } from "./data-grid-context"
31import {
32 DataGridFeaturesProvider,
33 DataGridInternalsProvider,
34 GRID_EDGE_SPEED,
35 GRID_EDGE_ZONE,
36 type DataGridInternals,
37 type GridEnv,
38 type GridFeatures,
39 type RegisterGridFeature,
40} from "./data-grid-features"
41
42export interface DataGridProps<TRow extends GridRow> {
43 grid: UseDataGrid<TRow>
44 children: React.ReactNode
45 className?: string
46 /**
47 * Called when the user presses `?` (with a focused cell, not editing) — wire
48 * it to open a keyboard-shortcuts help dialog. When unset, `?` types normally.
49 */
50 onRequestShortcuts?: () => void
51}
52
53/**
54 * The DataGrid container — the irreducible core. Place INSIDE `DataTableRoot`,
55 * wrapping the `DataTable`. It reads the table's DISPLAY order (post
56 * filter/sort) and owns the selection rectangle, keyboard navigation, drag
57 * range-select, and the scroll-into-view seam. Cells (addressed by row id)
58 * read their state from `DataGridContext`.
59 *
60 * Everything else is opt-in, composable children (mix and match — an unmounted
61 * feature attaches no listeners and tree-shakes out of the bundle):
62 *
63 * @example
64 * <DataGrid grid={grid}>
65 * <DataGridClipboard resolveCell={resolveCell} /> // copy/cut/paste
66 * <DataGridFillHandle /> // corner-drag fill
67 * <DataGridMove /> // border-drag move/copy
68 * <DataGridCrossHighlight /> // header/gutter highlight
69 * <DataTable>…</DataTable>
70// … truncated

What it pulls in

npm packages

  • lucide-react

Other registry items

  • https://niko-table.com/r/data-table.json
  • https://niko-table.com/r/data-table-virtualized.json
  • https://niko-table.com/r/data-table-column-resize.json
  • button
  • input
  • checkbox
  • calendar
  • popover
  • command
  • dialog
  • dropdown-menu
  • separator
  • kbd
  • tooltip

Files it writes

  • src/components/niko-table/grid/types/grid-cell.ts
  • src/components/niko-table/grid/config/grid-shortcuts.ts
  • src/components/niko-table/grid/hooks/use-data-grid.ts
  • src/components/niko-table/grid/hooks/use-grid-clipboard.ts
  • src/components/niko-table/grid/hooks/use-grid-columns.ts
  • src/components/niko-table/grid/hooks/use-grid-navigation.ts
  • src/components/niko-table/grid/hooks/use-grid-keyboard.ts
  • src/components/niko-table/grid/core/data-grid.tsx
  • src/components/niko-table/grid/core/data-grid-context.tsx
  • src/components/niko-table/grid/core/data-grid-features.tsx
  • src/components/niko-table/grid/core/data-grid-columns-context.tsx
  • src/components/niko-table/grid/cells/cell-props.ts
  • src/components/niko-table/grid/cells/cell-styles.ts
  • src/components/niko-table/grid/cells/grid-cell-display.tsx
  • src/components/niko-table/grid/cells/grid-marching-ants.tsx
  • src/components/niko-table/grid/cells/grid-text-cell.tsx
  • src/components/niko-table/grid/cells/grid-checkbox-cell.tsx
  • src/components/niko-table/grid/cells/grid-date-cell.tsx
  • src/components/niko-table/grid/cells/grid-combobox-cell.tsx
  • src/components/niko-table/grid/cells/grid-select-cell.tsx
  • src/components/niko-table/grid/components/grid-clipboard.tsx
  • src/components/niko-table/grid/components/grid-fill-handle.tsx
  • src/components/niko-table/grid/components/grid-move.tsx
  • src/components/niko-table/grid/components/grid-row-reorder.tsx
  • src/components/niko-table/grid/components/grid-cross-highlight.tsx
  • src/components/niko-table/grid/components/grid-status-bar.tsx
  • src/components/niko-table/grid/components/grid-column-menu.tsx
  • src/components/niko-table/grid/components/grid-add-column.tsx
  • src/components/niko-table/grid/components/grid-row-menu.tsx
  • src/components/niko-table/grid/components/grid-toolbar.tsx
  • src/components/niko-table/grid/components/grid-shortcuts-dialog.tsx

Facts

Registry
niko-table
Type
registry:block
Access
Free
Files written
31
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

niko-table.com Semkoo/niko-table-registry on GitHub Raw registry item This item as JSON

More from niko-table

All 31 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Data Tabledata-tableniko-tableBlocksFree2 deps · 37 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex