maxmarinich / react-alice-carousel

React responsive component for building content galleries, content rotators and any React carousels
MIT License
832 stars 91 forks source link

Set the distance of each swipe #280

Closed xiaoshanzhaguo closed 1 year ago

xiaoshanzhaguo commented 1 year ago

Is it possible to set the distance of each swipe?

maxmarinich commented 1 year ago

Hi, @xiaoshanzhaguo! There is no way (inside the lib) to set multiple swipeDelta props. As workaround you can update swipeDelta property each time after swipe inside onSlideChanged event (set new swipeDelta value for the current slide).