This component is created on top of the Mantine library.
Mantine Split extension for building flexible, resizable layouts composed of multiple panes. In v2, the architecture separates pane content (Split.Pane) from the resizing control (Split.Resizer), making the resizer a first-class, customizable element placed between panes.
Developers can define initial sizes in pixels or percentages, enforce min/max constraints, and use the grow property to let specific panes expand to fill available space. Orientation supports horizontal and vertical layouts, including responsive breakpoints, while the resizer can inherit global props from Split or be configured per instance, including a gradient variant with hover styles.
The component exposes resize lifecycle events on both the pane and resizer—delivering current width/height for one or both adjacent panes—enabling persistence of layouts via localStorage and real‑time UI feedback. Accessibility is built in: the resizer is focusable and supports keyboard resizing with configurable step and shiftStep values. Overall, it offers a clear JSX structure and a robust API for multi‑pane, highly controllable split views in Mantine applications.
npm install @gfazioli/mantine-split-paneor
yarn add @gfazioli/mantine-split-paneAfter installation import package styles at the root of your application:
import '@gfazioli/mantine-split-pane/styles.css';import { Split } from '@gfazioli/mantine-split-pane';
import { Paper } from '@mantine/core';
function Demo() {
return (
<Split>
<Split.Pane>
<Paper withBorder w="100%" mih="100%">
<h1>Pane 1</h1>
</Paper>
</Split.Pane>
<Split.Resizer />
<Split.Pane>
<Paper withBorder>
<h1>Pane 2</h1>
</Paper>
</Split.Pane>
</Split>
);
}