Components
Opt-in Data Grid feature components, toolbar, menus, and cell editors.
Context-aware pieces under grid/components/ and typed editors under grid/cells/. Mount only what you need as children of <DataGrid>: unmounted features attach no listeners and tree-shake out.
Directory structure
Section titled “Directory structure”grid/components/: clipboard, fill, move, toolbar, status bar, menusgrid/cells/: display shell + typed editors (GridTextCell, …)grid/core/: Core (DataGrid, context, features)grid/hooks/: Hooksgrid/types/: Typesgrid/config/: Config
Feature children
Section titled “Feature children”Children of <DataGrid>. Unmounted = tree-shaken.
| Component | Capability |
|---|---|
DataGridClipboard |
Copy / cut / paste (resolveCell optional — needed only for paste; copy/cut work without it) |
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 |
DataGridClipboard
Section titled “DataGridClipboard”<DataGrid grid={grid}> <DataGridClipboard resolveCell={resolveCell} /> <DataTable>…</DataTable></DataGrid>| Prop | Type | Description |
|---|---|---|
resolveCell? |
(columnId: string, raw: string) => CellState<string> |
Map pasted text into cell state (required for paste; copy/cut work without it) |
DataGridFillHandle / DataGridMove / DataGridRowReorder
Section titled “DataGridFillHandle / DataGridMove / DataGridRowReorder”No required props. Mount inside <DataGrid> next to the table.
DataGridCrossHighlight / DataGridStatusBar
Section titled “DataGridCrossHighlight / DataGridStatusBar”Cross-highlight paints header/gutter for the selection. Status bar aggregates the current range.
Toolbar
Section titled “Toolbar”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>Dynamic columns UI
Section titled “Dynamic columns UI”See Dynamic Columns.
| Component | Role |
|---|---|
DataGridAddColumnButton |
Add a column at runtime |
GridColumnMenuOptions |
Column type / remove options in menu |
Row menu
Section titled “Row menu”<GridRowMenu /> inside <DataTableRowContextMenuSlot>. Copy / Cut / Clear / Delete / Insert. Clipboard items appear only when DataGridClipboard is mounted.
Cell editors
Section titled “Cell editors”Display shell for every visible cell; heavy editor mounts only while editing. Walkthrough: Cell Types.
| 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>)Related guides
Section titled “Related guides”- Cell Types: editors in depth
- Validation:
status/errorand settle - Persistence:
useGridChanges - API Reference: consolidated dump