1.0.6 • Published 8 months ago

@ashxjs/split-view v1.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

Split View

Simple react split view component with a draggable separator. Easy to add in your favorite project. Lightweight library.

Summary

  1. Installation
  2. Adding Split View in your project

How to install Split View component


With NPM as package manager

NPM below 5.0.0

npm install --save @ashxjs/split-view 

NPM above 5.0.0

npm install @ashxjs/split-view 

With Yarn as package manager

yarn add @ashxjs/split-view

Using Split-View component

Easy to use

Code Example

import LeftComponent from "./LeftComponent";
import RightComponent from "./RightComponent";

const defaultPanelWidth = window.screen.widh / 3;

<>
    <SplitView
        left={LeftComponent}
        right={RightComponent}
        defaultLeftPanelWidth={defaultPanelWidth}
        />
</>

Component Props

Props nameDefault valueDescription
leftnoneLeft component to render
rightnoneRight component to render
defaultLeftPanelWidthnoneInitialize the default left panel size when component first render