asmyshlyaev177 / react-horizontal-scrolling-menu

Horizontal scrolling menu component for React.
https://www.npmjs.com/package/react-horizontal-scrolling-menu
MIT License
768 stars 98 forks source link

Have the amount of scroll as a configuration option #293

Closed Webjin closed 3 weeks ago

Webjin commented 3 weeks ago

Currently when I scroll using the mouse scrollwheel, or when I use the LeftArrow or the RightArrow, the ScrollMenu almost directly scrolls the the end of the horizontal width.

What I would like is a configuration option to set the amount of scroll per scrollwheel ticket, or per click.

In my situation I would simply like the next "react-horizontal-scrolling-menu--item" to become the most left item. and each scrollttick to the right, or each click on the RightArrow should move the ScrollMenu one item to the left.

asmyshlyaev177 commented 3 weeks ago

Is OneItemScroll example is what you looking for https://asmyshlyaev177.github.io/react-horizontal-scrolling-menu/?path=/story/examples-oneitemscroll--one-item-scroll ? onWheel can be adjusted similar to arrows.

Webjin commented 3 weeks ago

Amazing! Thanks for the quick response<3