Fragiola

Getting started

Installation

Install the package for your framework, React, Vue or Angular, check the peer dependencies, and see why there is no stylesheet to import.

A React app installs one package, @fragiola/grid-layout-react: the primitives, the hooks and the whole framework-free core, re-exported.

pnpm add @fragiola/grid-layout-react

The core, @fragiola/grid-layout, comes along: import its types and helpers from your framework's package, which re-exports it.

Peer dependencies

requirementwhy
react and react-dom ^19 (React)peer dependencies of @fragiola/grid-layout-react: the primitives use ref as a plain prop and ref cleanup functions
vue ^3.5 (Vue)the peer dependency of @fragiola/grid-layout-vue
@angular/core ^22 (Angular)the peer dependency of @fragiola/grid-layout-angular: standalone directives and signals, no zone.js needed
A browser DOMthe engine measures the root and its items; the model loads in plain Node (tests, a server)

The packages have no other runtime dependency, and the core has none at all: no drag library, no resize library.

What to import from where

import {
    // the primitives (one namespace) and the hooks
    GridLayout,
    useGridLayout,
    // the core: its types and helpers
    type Layout,
    verticalCompactor,
} from "@fragiola/grid-layout-react";

No stylesheet

There is nothing to import for styles. The primitives set only the inline style they need to work (a position, a size, a transform). Style every part with your own classes and the data-* attributes it exposes. See Styling with Tailwind and Styling with plain CSS.

A width to lay out in

GridLayout.Root measures its own width and places the items in it. Give it a width (or let it fill its parent): its height follows the layout.