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.
Cell props
Section titled “Cell props”The shared props contract for every typed cell.
CellEditorPropsis whatDataGridCellpasses to its render prop: focus and edit flags, commit helpers, and the currentCellState.GridComboboxOptionis the shape of searchable dropdown options (label/value).
Cell styles
Section titled “Cell styles”| 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.
Clipboard helpers
Section titled “Clipboard helpers”Exported from the clipboard hook. DataGridClipboard uses them:
| Helper | Role |
|---|---|
parseTsv |
Parse clipboard text into a 2D matrix |
serializeSelection |
Selection → TSV for copy |
Feature constants
Section titled “Feature constants”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 |
Related table lib
Section titled “Related table lib”Shared table helpers (filter operators, formatting, and more) stay in Niko Table:
- Library overview
- Installing
data-table-gridalso adds the scroll and flash helpers the grid body uses