@gfazioli/mantine-split-pane
Version:
A React component that manages split panes allows users to divide and resize content areas within a layout efficiently.
86 lines (58 loc) ⢠2.96 kB
Markdown
# Mantine Split pane Component
<div align="center">
https://github.com/user-attachments/assets/2e45af2b-60c7-4cb3-9b9a-6cf0e710af1c
</div>
---
<div align="center">
[](https://www.npmjs.com/package/@gfazioli/mantine-split-pane)
[](https://www.npmjs.com/package/@gfazioli/mantine-split-pane)
[](https://www.npmjs.com/package/@gfazioli/mantine-split-pane)

</div>
## Overview
This component is created on top of the [Mantine](https://mantine.dev/) library.
[](https://mantine.dev/)
Utilizing Mantine UI, enables users to create a flexible layout with resizable split panes. It supports both vertical and horizontal splitting, allowing the arrangement of content in various configurations. The component seamlessly handles nested split panes, enabling complex layouts with ease.
With intuitive resizing functionality, users can adjust the size of each pane effortlessly. This component provides a responsive and user-friendly interface for organizing and displaying content in a way that best suits the application's needs.
[](https://www.youtube.com/playlist?list=PL85tTROKkZrWyqCcmNCdWajpx05-cTal4)
[](https://gfazioli.github.io/mantine-split-pane/)
[](https://mantine-extensions.vercel.app/)
š You can find more components on the [Mantine Extensions Hub](https://mantine-extensions.vercel.app/) library.
## Installation
```sh
npm install @gfazioli/mantine-split-pane
```
or
```sh
yarn add @gfazioli/mantine-split-pane
```
After installation import package styles at the root of your application:
```tsx
import '@gfazioli/mantine-split-pane/styles.css';
```
## Usage
```tsx
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>
);
}
```