Split the screen into resizeable sections.
npm install partition.js``js`
var splitScreen = new Partition({
direction: 'vertical',
a: '#left',
b: '#right',
barWidth: '8'
});`css
#left, #right {
}
`new Partition({options})
To make a new Partition: :$3
- __direction__
- horizontal
- vertical
- Is Required
- __a__ and __b__
- DOM element, String or DOM-Selector
- Is Required
- __bar__
- DOM element, String or DOM-Selector
- Will be inserted between a and b if not added.
- __barWidth__
- The thickness of the resize bar in pixels.
- Default is 10
- __stopGap__
- Where the the bar will stop in percent.
- defualt is 10
- __splitSize__
- The initial size of the elements in percent.
- defualt is '50 50'
- __iframe__
- Lets you resize over iframes
- Boolean defualt = false
html
`
CSS
`css
#app {
width: 500px;
height: 500px;
margin: auto;
}
#left {
background-color: pink;
}
#right {
background-color: lightblue;
}
`
JS
`js
var part = new Partition({
direction: 'vertical',
a: '#left',
b: '#right',
})
``