1.0.3 • Published 4 years ago

react-slide-pane v1.0.3

Weekly downloads
35
License
MIT
Repository
github
Last release
4 years ago

React Slide Pane

Commitizen friendly Codepen Preview lerna

Split-Pane React component, can be nested or split vertically or horizontally and diff image!

Preview in storybook

React Slide Pane Demo

Usage

Edit ReactSlidePane

import React from 'react'
import ReactDOM from 'react-dom'
import SlidePane from 'react-slide-pane'

ReactDOM.render(
  <>
    <SlidePane width={600} height={400} split="vertical" initial="200px">
      <img src="https://jdc.jd.com/img/600x400?text=1" />
      <img src="https://jdc.jd.com/img/600x400?text=2" />
    </SlidePane>
  </>,
  mountNode
)

API

NameTypeDefaultDescription
widthnumber600The width of pane conmponent
heightnumber400The height of pane conmponent
initialnumber / string200The initial position of resizer
splitstringverticalIf split is equal to horizontally, the resizer will be horizontally.
childrenReact.ElementundefiedThe children of slide pane coms

Reference

react-split-pane

react-component/slider

react-split-pane-v2