Installation
Install the React, the Vue or the Angular package, check the peer dependencies, and give the grid a size to scroll in.
Install the package
A React app installs one package, @fragiola/data-grid-react: the primitives, the hooks and the
whole framework-agnostic core, re-exported.
pnpm add @fragiola/data-grid-reactThe core, @fragiola/data-grid, comes along: import its types and helpers from any of the
packages.
Features and entry points
The main entry is a small core: it renders, scrolls and virtualizes, as a plain table. The rest
comes from entry points of the same package, imported only when used. Most are
features, installed on a grid through the root's features:
| entry | holds |
|---|---|
/navigation | navigation(): the keys, the active cell and one tab stop (Keyboard) |
/sorting | sorting(): columns that sort (Sorting) |
/row-selection | rowSelection() and a "select all" control (Row selection) |
/range | cellRange(): a range of cells, with navigation() (Cell selection) |
/clipboard | clipboard(): copy and paste a range, with cellRange() |
/fill | fillHandle() and the handle's element, with cellRange() (Fill) |
/editing | editing() and an editor's props, with navigation() (Editing cells) |
/column-resize | columnResize() and a resize handle's props (Column resizing) |
/column-reorder | columnReorder(): columns moved by a drag or the keys (Column reordering) |
/column-pinning | columnPinning(): columns pinned at the start or the end (Pinned columns) |
/column-group-collapse | columnGroupCollapse(): collapsible column groups (Collapsible groups) |
/row-expansion | rowExpansion() and RowDetail: rows that expand into a detail (Master-detail) |
/row-grouping | rowGrouping() and the group toggle: group rows and trees that expand (Row grouping) |
/row-reorder | rowReorder() and a row's drag handle (Row reordering) |
/spans | cellSpans(): a column's colSpan in the body (Column spanning) |
/summary-rows | summaryRows() and Summary: rows of figures (Summary rows) |
/local | rows in memory, sorted, filtered, grouped and paged (Rows in memory) |
So @fragiola/data-grid-react/navigation (or -vue/navigation, -angular/navigation) needs no
other package. What an app never imports is not in its bundle.
Peer dependencies
The React package needs React 19 (react and react-dom). It has no other runtime
dependency, and the core has none at all.
No stylesheet
There is nothing to import for styles: the primitives set only the inline style they need to
place things (positions and sizes). Style the parts with your own classes: in React through
className, style or render, in Vue through class, style, as or the render slot
(Vue primitives maps each React prop the other pages show), in Angular on your
own elements, which the directives go on (Angular directives). See
Styling with Tailwind and
Styling with plain CSS.
A size to scroll in
DataGrid.Root (in Angular, the element dataGridRoot is on) is the scroll container. Give it a height (and a width, or let it fill its
parent), or it grows with its content and nothing is virtualized. See
Sizing the grid.