1.0.0 • Published 4 years ago
@react-styless/scrollable v1.0.0
react-styless/scrollable
You can make your horizontal scroll box scrollable by mouse dragging.
Installation
// with npm
$ npm install @react-styless/scrollable --saveUsage
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 |