{"repo":"johnwalley/allotment","free":true,"listed":false,"github":"https://github.com/johnwalley/allotment","clone":"git clone https://github.com/johnwalley/allotment.git","description":"A React component for resizable split views","language":"TypeScript","stars":1257,"topics":["react","split","splitter","pane","panel"],"license":"MIT","category":"ui-components","readme_excerpt":"Allotment React split-pane component. - React-based: Integrate effortlessly into your existing React-based application. - Industry standard look and feel: Like VS Code's split view implementation? You're in luck! This component is derived from the same codebase. - Dynamic: Want to declaratively add and remove panes? We've got you covered. Examples You can find examples of using the library here. Getting Started Allotment is available from npm. Prerequisites Allotment has react and react-dom as peer dependencies. Installation Usage If you want more control over the behaviour of the individual panes you can use the Allotment.Pane component. This includes setting the minimum and maximum size of a pane, as well as whether to enable snapping behaviour. Allotment props All properties are optional. defaultSizes An array of initial sizes of the panes. If the sum of the sizes differs from the size of the container then the panes' sizes will be scaled proportionally. maxSize (default: Infinity ) Maximum size of any pane. minSize (default: 30 ) Minimum size of any pane. proportionalLayout (default: true ) Resize each view proportionally when resizing container. separator (default: true ) Whether to render a separator between panes. snap (default: false ) Enable snap to zero for all panes. vertical (default: false ) Direction to split. If true then the panes will be stacked vertically, otherwise they will be stacked horizontally. onChange Callback that is fired when the pane sizes change","default_branch":null,"files":null,"tree":[],"storefront":"/r/johnwalley","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/johnwalley/allotment/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}