GithubHelp home page GithubHelp logo

gfazioli / mantine-split-pane Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 3.93 MB

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/

License: MIT License

JavaScript 7.44% TypeScript 82.36% CSS 10.20%
mantine pane react split splitpane typescript ui

mantine-split-pane's Introduction

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>
  );
}

mantine-split-pane's People

Contributors

gfazioli avatar

Stargazers

Cristóvão GUIHO avatar  avatar  avatar Muhamed Brifkani avatar  avatar

Watchers

 avatar

mantine-split-pane's Issues

Collapse/Expand Split.Pane with Double Click of Pane Gutter

Hi...great work on mantine-split-pane! Very nice codebase.

I've been testing it in our application and it is very promising. I've looked at the documentation available, and saw the secton on "Reset with Double Click". I'm trying to set up a 3 pane layout with a main center pane and then right and left panes that can be expanded or collapsed by clicking the pane gutter. I've attempted to use minWdith, initialWidth, and maxWdith to make it work. The double click collapses the pane, but does not restore to either the previous width or the initialWidth.

Is it possible to enable double click to collapse to 0 width and then on next double click expand to initialWidth?

Not sure if you're looking at feature requests yet, but this would be useful (in my opinion.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.