react-zeugma logoreact-zeugma
HomeDemoDocs
NPMNPMGitHubGitHub
v0.5.1 • React 18 & 19 Ready

A modern building block for complex workspace layouts.

Headless, draggable, and resizable layout manager for React. Build IDEs, dashboards, and advanced interfaces in minutes, not days.

Open Live Demo $ npm i react-zeugma

Designed for Workspace Builders

Stop 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.

Arbitrary Splits

Split horizontally or vertically without constraints. Create complex bento grids or simple side-by-side layouts instantly.

Smooth Resizing

Fluid, non-blocking resize handles with snap-to-edge capabilities. Feels completely native to the browser.

Flexible & Unopinionated

Save and load layout trees via simple JSON serialization. Complete control over state management and persistence flows.

Headless Design

We handle the complex math, drop zones, and tree states. You bring your own CSS and components.

App.tsxtsx
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>
  );
}
Can You Solve It?

Spell ZEUGMA

Named after the ancient Greco-Roman city in Gaziantep, Turkey, world-renowned for its breathtaking mosaics. Just as Zeugma's ancient artisans assembled countless tesserae into grand masterpieces, react-zeugma lets you assemble distinct panes into one seamless workspace.

Drag the tiles into the right order · Something special awaits ✨

react-zeugma logo
react-zeugma

A flexible, headless, and completely unopinionated workspace layout engine for React. Split, drag, and resize panes without constraints.

References

  • GitHub Repository
  • NPM Package

Community

  • Contributing Guide
  • Issues & Feedback
  • MIT License
© 2026 react-zeugma. All rights reserved.
Named after the ancient city of Zeugma inGaziantep, Turkey