Simple react
split view component with a draggable separator.
Easy to add in your favorite project.
Lightweight library.
NPM below 5.0.0
npm install --save @ashxjs/split-view
NPM above 5.0.0
npm install @ashxjs/split-view
yarn add @ashxjs/split-view
import LeftComponent from "./LeftComponent";
import RightComponent from "./RightComponent";
const defaultPanelWidth = window.screen.widh / 3;
<>
<SplitView
left={LeftComponent}
right={RightComponent}
defaultLeftPanelWidth={defaultPanelWidth}
/>
</>
Props name | Default value | Description |
---|---|---|
left |
none | Left component to render |
right |
none | Right component to render |
defaultLeftPanelWidth |
none | Initialize the default left panel size when component first render |