Skip to content
Niko Table

Niko Grid Library

Cell props, shared styles, clipboard helpers, and other grid utilities.

Niko Grid has no grid/lib/ folder. Its shared helpers live next to the cells and clipboard code. This page lists them, like the Niko Table Library page.

The shared props contract for every typed cell.

  • CellEditorProps is what DataGridCell passes to its render prop: focus and edit flags, commit helpers, and the current CellState.
  • GridComboboxOption is the shape of searchable dropdown options (label / value).
Export Role
CELL_HEIGHT Default row/cell height (36)
cellTriggerClass Classnames for the display trigger (status chrome)

Use these in a custom editor so it lines up with the built-in cells.

Exported from the clipboard hook. DataGridClipboard uses them:

Helper Role
parseTsv Parse clipboard text into a 2D matrix
serializeSelection Selection → TSV for copy

From data-grid-features.tsx. They control edge auto-scroll while you drag fill or move:

Constant Default Role
GRID_EDGE_ZONE 36 Px near edge to start scroll
GRID_EDGE_SPEED 14 Scroll step
clampGridIndex - Clamp display indices

Shared table helpers (filter operators, formatting, and more) stay in Niko Table:

  • Library overview
  • Installing data-table-grid also adds the scroll and flash helpers the grid body uses