react-resize-panel

react-resize-panel JS library on npm Download react-resize-panel JS library

A very simple resizable panel as a React component. Demo [here](https://bjgrosse.github.io/react-resize-panel/demo/public/index.html).

Version 0.3.5
react-resize-panel has no homepage
react-resize-panel JS library on GitHub
react-resize-panel JS library on npm
Download react-resize-panel JS library

react-resize-panel

A very simple resizable panel as a React component. Demo here.

Resize panel demo

<ResizePanel direction="e">
<div className="panel sidebar">left panel</div>
</ResizePanel>

Getting started

Install the package:

yarn install react-resize-panel

Import component:

import ResizePanel from "react-resize-panel";

Wrap the DIV you want to make resizable:

<ResizePanel direction="e">
    <div className="panel sidebar">left panel</div>
</ResizePanel>

The direction prop specifies which edge of the panel has the resize handle and whether the panel can be resized vertically or horizontally. Accepted values are: n | s | e | w.

Custom CSS classes can be specified for the resize handle and border:

<ResizePanel direction="e" handleClass="customHandle" borderClass="customResizeBorder">
    <div className="panel sidebar">left panel</div>
</ResizePanel>

License

MIT.