@ruttwice/horizontalscroll
v1.0.5
Published
horizontal scroll with mouse wheel using React
Downloads
5
Readme
horizontal scroll
horizontal scroll with mouse wheel using React
Installation
Install my-project with npm
npm i @ruttwice/horizontalscroll
how to use
import { horizontalScroll } from "@ruttwice/horizontalscroll";
//example
<div
onWheel={(e) => horizontalScroll(e, speed)}
//recommend speed 15
//speed is value type number only
//onWheel={(e) => horizontalScroll(e, 10)}
//tag horizontal scroll ,css display:flaxbox
>
<button>A</button>
<button>B</button>
<button>C</button>
<button>D</button>
<button>F</button>
<button>G</button>
</div>;