A React tiling window manager
react-mosaic is a React tiling window manager. It gives you a drag-to-resize, drag-to-rearrange layout of panels that users can freely rearrange — inspired by IDE window management and i3-style tiling.
** Documentation · Demo · API reference · Migration from v6**
npm install react-mosaic-component react react-domImport the stylesheet in your app's entry point:
import 'react-mosaic-component/react-mosaic-component.css';import { Mosaic, MosaicWindow } from 'react-mosaic-component';
import 'react-mosaic-component/react-mosaic-component.css';
export function App() {
return (
</MosaicWindow>
)}
initialValue={{
type: 'split',
direction: 'row',
children: ['a', 'b'],
}}
/>
</div>
);
}That's a two-panel layout with a draggable divider, drag handles on each window title bar, and default toolbar buttons — in 15 lines.
For live editable examples, the n-ary tree model, custom toolbars, tabs, theming, and the full API reference, see the documentation site.
value + onChange to manage the tree yourself, or initialValue to let the component own it.react-dnd with HTML5 and touch backends.convertLegacyToNary is available for explicit upgrades.Contributions are welcome:
npm installnpm startnpm run build:libnpm testnpm run lintIssues and pull requests: github.com/nomcopter/react-mosaic
Apache License 2.0 — see LICENSE.
Originally developed by Kevin Verdieck at Palantir Technologies, Inc.
No open issues yet, or sync has not completed.