opentui-split[community]
OpenTUI Split
OpenTUI Split creates resizable boxes along one axis.
The core class drives the layout. Call addPane(pane, size, minSize) to append a pane, and read sizes back through the onSizesChange callback after a drag or a container resize.
const outer = new SplitPaneRenderable(renderer, {
id: "outer",
direction: "horizontal",
onSizesChange: (sizes) => saveLayout(sizes),
});
outer.addPane(sidebar, 26, 16);
outer.addPane(mainArea, 80, 20);The React and Solid adapters register a split_pane element that reads box children and the sizes and minSizes props. They insert and remove gutters as children mount, move, or unmount. The intrinsics self-register on import, and an exported registerSplitPane() covers bundlers that strip the side effect.
Gutter width, color, visibility, and divider glyphs are configurable, and a hidden gutter still drags. The package runs on Bun and Node.js. The README documents the core API, the adapters, and the gutter options.