Skip to content
Install

Install

container-relative layout and pointer ownership

For a published npm release:

TERMINAL
npm install @fungi.computer/maosaico react

pnpm, Yarn and Bun work the same way.

Bring your own react. @fungi.computer/maosaico lists it as a peer dependency so your app keeps one copy.

  • @fungi.computer/maosaico
  • @fungi.computer/maosaico/bento
  • @fungi.computer/maosaico/headless

Installing @fungi.computer/maosaico also installs jotai.

Maosaico is a React tiling layout package. It requires React 17 or newer as a peer dependency. From the repository root, build it with:

TERMINAL
pnpm --filter @fungi.computer/maosaico build

The package exports MaosaicoRoot, useMaosaicoItem, useMaosaicoLayout, MaosaicoLayers, useLayer, and usePointerDrag from @fungi.computer/maosaico.

usePointerDrag supplies captured-pointer DOM props for a caller-owned gesture. Its move callback receives incremental pixel deltas; cancellation and unmount release the same capture. An optional third AbortSignal lets the caller cancel a gesture; Escape policy stays with the caller. Grove uses it with the Caps ResizeHandle for its conversation rail, without introducing a tiling root for one sidebar width.