All Projects → b-zurg → react-collapse-pane

b-zurg / react-collapse-pane

Licence: MIT license
The splittable, draggable, collapsible panel layout library 🎉

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-collapse-pane

Pdfsam
PDFsam, a desktop application to extract pages, split, merge, mix and rotate PDF files
Stars: ✭ 1,829 (+1072.44%)
Mutual labels:  split, splitter
allotment
A React component for resizable split views
Stars: ✭ 359 (+130.13%)
Mutual labels:  split, splitter
Auto-Collapse-Closing-Blocks
Default close blocks. Allows developers to leave an inline comment in a source file (html, ts, js, scss, xml, etc) that will automatically collapse the block starting on the next line whenever they open a file.
Stars: ✭ 18 (-88.46%)
Mutual labels:  collapse
Accordion.JS
Accordion.JS: Free jQuery Accordion plugin
Stars: ✭ 34 (-78.21%)
Mutual labels:  collapse
angular-app
Angular 14 ,Bootstrap 5, Node.js, Express.js, ESLint, CRUD, PWA, SSR, SEO, Universal, Lazy Loading
Stars: ✭ 389 (+149.36%)
Mutual labels:  collapse
ruby-client
Ruby SDK client for Split Software
Stars: ✭ 22 (-85.9%)
Mutual labels:  split
dockview
Zero dependency layout manager and builder with ReactJS support
Stars: ✭ 45 (-71.15%)
Mutual labels:  splitter
ontwik-ui
ontwik-ui - A headless UI library
Stars: ✭ 52 (-66.67%)
Mutual labels:  tsdx
split-on-first
Split a string on the first occurrence of a given separator
Stars: ✭ 68 (-56.41%)
Mutual labels:  split
SplittableViewKit
A cell of IndexPath(row: 0, section: 0) in UITableView is automatically moved to left view when device rotated.
Stars: ✭ 39 (-75%)
Mutual labels:  split
react-typewriter-js
Simple vanilla JS script to simulate text typewriting effect.
Stars: ✭ 18 (-88.46%)
Mutual labels:  split
monorepo-split-github-action
Github Action for Monorepo Split
Stars: ✭ 56 (-64.1%)
Mutual labels:  split
Accordion-Collapse-react-native
React native Accordion/Collapse component, very good to use in toggles & show/hide content
Stars: ✭ 147 (-5.77%)
Mutual labels:  collapse
SimpleWavSplitter
Split multi-channel WAV files into single channel WAV files.
Stars: ✭ 15 (-90.38%)
Mutual labels:  splitter
AEScript-Explode-Shape-Layer
Extract shapes from a shape layer to individual layers
Stars: ✭ 37 (-76.28%)
Mutual labels:  split
ModuleServices
Reusable ViewController with TableView, split in Sections (called here modules) that help you to develop faster in Swift
Stars: ✭ 21 (-86.54%)
Mutual labels:  split
flex-splitter-directive
Dead simple panes splitter control based on flexbox. JS + CSS < 1kB (gzipped) with no dependencies.
Stars: ✭ 19 (-87.82%)
Mutual labels:  splitter
sidebar-menu
jQuery sidebar-menu component
Stars: ✭ 77 (-50.64%)
Mutual labels:  collapse
spiral
A Python 3 module that provides functions for splitting identifiers found in source code files.
Stars: ✭ 37 (-76.28%)
Mutual labels:  splitter
git-split-file
Split a file in a git repository without losing the git history.
Stars: ✭ 25 (-83.97%)
Mutual labels:  split

react-collapse-pane

This is intended to be the simple, reliable, configurable, and elegant solution to having splittable, draggable and collapsible panes in your React application.

logo

prs welcome Release All Contributors styled with prettier semantic-release npm latest version npm next version npm downloads storybook storybook

[click for storybook demo]

[click for documentation site]

Getting Started 🚀

Install react-collapse-pane:

npm i react-collapse-pane

# or for yarn

yarn add react-collapse-pane

Once installed you can import the SplitPane component in your code.

import { SplitPane } from "react-collapse-pane";

If you're using Typescript the SplitPaneProps, as well as a few other helper types type is also available.

NOTE: Since the upgrade to MUI v5 you need to install a peer dependency style engine. Since there is a decision between styled components and emotion I did not make this an explicit dependency.

If you want to simply use the default then follow the install guide here https://mui.com/material-ui/getting-started/installation/ If you want to use styled components then follow the configuration guide here https://mui.com/material-ui/guides/styled-engine/

In the future this dependency will be removed, apologies for the hassle while that gets sorted out. The next version will be much leaner.

import { SplitPane, SplitPaneProps, ResizerOptions, CollapseOptions, SplitPaneHooks } from "react-collapse-pane";

Quick Start Usage 🔥

The only component you must interact with is SplitPane. This serves as a wrapper for all of the children you wish to lay out.

All you're required to give is a split prop which can be either "horizontal" or "vertical". This identifies what the orientation of the split panel will be.

<SplitPane split="vertical" collapse={true}>
  <div>This is the first div</div>
  <div>This is the second div</div>
  <div>This is the third div</div>
  This is the fourth but not a div!
</SplitPane>

What you just did is make a split collapsible panel layout!

Congrats! That was easy! 😁

This basically splits the children vertically (i.e. full-height split). The children can be any valid React child. If a child is null it will be excluded from being split or displayed.

By default there is a 1px divider with a grabbable surface of 1rem width or height (depending on the split). If you hover over the divider a button will appear that you can use to collapse the panel.

There is no limit to the number of elements you have as children. The SplitPane will split them all accordingly.

But what about styling the resizer, the buttons, controlling the animations, or RTL support? 😭

This library supports all of these things and more!

For more details check out the documentation

Documentation

Documentation can be found at https://b-zurg.github.io/react-collapse-pane/

If you notice an issue then please make an issue or a PR! All docs are generated from the docs folder in the master branch.

Contributing and PRs 💖

If you would like to contribute please check out the contributor guide

All contributions are welcome! All issues and feature requests are welcome!

Credit and Attribution 🙏

This project did not start off from scratch. The foundation of the project was the excellently written react-multi-split-pane library which is itself a typescript rewrite of the react-split-pane library.

Much gratitude to their authors, @NeoRaider and @tomkp

Contributors

Thanks goes to these wonderful people (emoji key):


Buzurg Arjmandi

⚠️ 📖 💻 🎨 💡 📦

hst44

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].