gfazioli / mantine-split-pane

A React component that manages split panes allows users to divide and resize content areas within a layout efficiently.

Home Page:https://gfazioli.github.io/mantine-split-pane/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mantine Split pane Component


NPM version NPM Downloads NPM License

Overview

This component is created on top of the Mantine library.

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.

Installation

npm install @gfazioli/mantine-split-pane

or

yarn add @gfazioli/mantine-split-pane

After installation import package styles at the root of your application:

import '@gfazioli/mantine-split-pane/styles.css';

Usage

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.Pane>
        <Paper withBorder>
          <h1>Pane 2</h1>
        </Paper>
      </Split.Pane>
    </Split>
  );
}

About

A React component that manages split panes allows users to divide and resize content areas within a layout efficiently.

https://gfazioli.github.io/mantine-split-pane/

License:MIT License


Languages

Language:TypeScript 82.4%Language:CSS 10.2%Language:JavaScript 7.4%