Headless, draggable, and resizable layout manager for React. Build IDEs, dashboards, and advanced interfaces in minutes, not days.
$ npm i react-zeugmaStop fighting with CSS Grid or wrestling absolute positioning math. react-zeugma manages the complexities of arbitrary window splitting, dragging, and resizing so you can focus on building your app.
import { useState } from 'react'; import { DashboardProvider, PaneTree, Pane, DragHandle } from 'react-zeugma'; export default function App() { const [layout, setLayout] = useState({ type: 'split', direction: 'row', splitPercentage: 25, first: { type: 'pane', paneId: 'sidebar' }, second: { type: 'split', direction: 'column', splitPercentage: 70, first: { type: 'pane', paneId: 'editor' }, second: { type: 'pane', paneId: 'terminal' } } }); return ( <DashboardProvider layout={layout} onChange={setLayout} renderPane={(id) => ( <Pane id={id}> {({ remove }) => ( <div className="pane"> <DragHandle> <div className="title-bar"> <span>{id}</span> <button onClick={remove}>×</button> </div> </DragHandle> <div className="pane-content">Content for {id}</div> </div> )} </Pane> )} > <PaneTree /> </DashboardProvider> ); }