@react-styless/scrollable
v1.0.0
Published
You can make your horizontal scroll box scrollable by mouse dragging.
Downloads
2
Readme
react-styless/scrollable
You can make your horizontal scroll box scrollable by mouse dragging.
Installation
// with npm
$ npm install @react-styless/scrollable --save
Usage
This is the basic usage of scrollable
import Scrollable from '@react-styless/scrollable';
const App = () => {
return (
<Scrollable>
<div style={{width: 400, overflow: 'auto'}}>
<div style={{width: 800, background: 'red'}}>child</div>
</div>
</Scrollable>
);
}
| Attribute | Type | Description | | --------- | ------------------ | ----------- | | children | ReactNode | | | vertical | boolean, undefined | |