@ruttwice/horizontalscroll

1.0.5 • Public • Published

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>;

Readme

Keywords

none

Package Sidebar

Install

npm i @ruttwice/horizontalscroll

Weekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

1.2 kB

Total Files

3

Last publish

Collaborators

  • nopparut41