@dxos/react-ui-mosaic
TypeScript icon, indicating that this package has built-in type declarations

0.7.5-feature-compute.4d9d99a • Public • Published

Mosaic

Mosaic is a drag-and-drop layout system for building responsive, multi-column layouts. It is built on top of dnd kit and DXOS UI.

Taxonomy

Item Description
Mosaic.Provider A Root container and React context that routes events between Containers.
Mosaic.Overlay A DOM portal managed by the Mosaic context that renders a Container's Component while dragging.
Mosaic.Container A complex React component that manages the layout of a collection of tiles (e.g., Grid, Kanban, Stack, Table, Tree).
Mosaic.Tile A Draggable wrapper managed by its parent container.
Component A pure React component that is rendered within the layout via the container's Tile or the root Mosaic's Overlay.
Item A datum represented by a Tile.

Design principles

  • Extends dnd-kit without obfuscation or wrapping; for example, mosaic provides additional hooks in the same manner as dnd-kit's own useSortable`.
  • Mosaics consist of containers and pure components that can be laid out and rearranged by the user
  • DXOS UI components are pure tailwind-styled Radix components that expose small parts (List, ListItem, ListItem.Header, etc.)
  • Mosaic Containers define their own data model and assemble Radix-style DXOS UI components.
  • Containers implement specific layouts of Tiles, which may reuse common components, such as DXOS UI Cards.
  • Container Models facilitate pure React components, but are easily mapped to data structures (e.g., Graph) and ECHO data sets without the need to wrap/map the underlying reactive objects (e.g., via signals).

Issues

Readme

Keywords

none

Package Sidebar

Install

npm i @dxos/react-ui-mosaic

Homepage

dxos.org

Weekly Downloads

228

Version

0.7.5-feature-compute.4d9d99a

License

MIT

Unpacked Size

456 kB

Total Files

154

Last publish

Collaborators

  • richburdon
  • marik_d
  • wittjosiah
  • dxos-bot
  • mykola-vrmchk
  • yarolegovich