Skip to content
Niko Table

Niko Grid Components

Opt-in Niko Grid features, toolbar, menus, and cell editors.

Use this page to find the grid piece you need. Pieces live in grid/components/, and typed editors live in grid/cells/. Mount only what you need as children of <DataGrid>. Unmounted features add no listeners and are tree-shaken.

  • grid/components/: clipboard, fill, move, toolbar, status bar, menus
  • grid/cells/: display shell + typed editors (GridTextCell, …)
  • grid/core/: Core (DataGrid, context, features)
  • grid/hooks/: Hooks
  • grid/types/: Types
  • grid/config/: Config

Add these as children of <DataGrid>. Anything you do not mount is tree-shaken.

Component Capability
DataGridClipboard Copy / cut / paste (resolveCell is only needed for paste)
DataGridFillHandle Corner fill; double-click auto-fill
DataGridMove Drag block to move (Ctrl/Cmd = copy)
DataGridRowReorder Row drag: prefer without active sort
DataGridCrossHighlight Selection chrome on header / gutter
DataGridStatusBar Aggregate the selection
<DataGrid grid={grid}>
<DataGridClipboard resolveCell={resolveCell} />
<DataTable>…</DataTable>
</DataGrid>
Prop Type Description
resolveCell? (columnId: string, raw: string) => CellState<string> Maps pasted text to cell state. Needed only for paste

DataGridFillHandle / DataGridMove / DataGridRowReorder

Section titled “DataGridFillHandle / DataGridMove / DataGridRowReorder”

No required props. Mount them inside <DataGrid>, next to the table.

DataGridCrossHighlight / DataGridStatusBar

Section titled “DataGridCrossHighlight / DataGridStatusBar”
  • Cross highlight marks the header and gutter for the selection.
  • Status bar shows totals for the selected range.

From grid-toolbar:

Component Role
DataGridToolbar Flex row for undo / redo / add / clear
DataGridUndo Undo last mutation
DataGridRedo Redo
DataGridAddRows Append count blank rows
DataGridClearAll Replace all rows with blanks
DataGridPasteHint Clipboard paste affordance
DataGridShortcutsButton Opens ? shortcuts dialog
<DataGridToolbar>
<DataGridUndo />
<DataGridRedo />
<DataGridAddRows count={5} />
<DataGridClearAll />
<DataGridShortcutsButton />
</DataGridToolbar>

See Dynamic Columns.

Component Role
DataGridAddColumnButton Add a column at runtime
GridColumnMenuOptions Column type / remove options in menu

Put <GridRowMenu /> inside <DataTableRowContextMenuSlot>. It offers Copy, Cut, Clear, Delete, and Insert. Clipboard items show only when DataGridClipboard is mounted.

Every visible cell shows a light display shell. The heavy editor mounts only while you edit. See Cell Types for a walkthrough.

Component Use
GridTextCell Free text
GridNumberCell Numeric; optional format for currency display
GridCheckboxCell Boolean; always interactive
GridDateCell Calendar; stores YYYY-MM-DD
GridSelectCell Dropdown (no search)
GridComboboxCell Searchable dropdown
GridCellDisplay Shared read-only shell for custom cells
GridMarchingAnts Copy outline
cell: (ctx) => (
<DataGridCell row={ctx.row.original} columnId={col.id}>
{(p) => <GridTextCell {...p} resolve={(raw) => resolveCell(col.id, raw)} />}
</DataGridCell>
)