nuka-carousel icon indicating copy to clipboard operation
nuka-carousel copied to clipboard

Disable autoplay on swipe

Open omar-complex opened this issue 7 years ago • 1 comments

Hello,

Is there any support for disabling autoplay after swiping? Currently the afterSlide() method cannot make any distinction as to what caused the slide to change. Pauseonhover is very convenient on desktop, and I am trying to implement a similar behavior on mobile where a user swipes and autoplay stops. Perhaps a tweak can be made to the current swipe detection and/or afterSlide() method? I have tried using other swipe libraries such as react-easy-swipe to wrap around the carousel and some basic state management but it's been unsuccessful. I think it would be best if this feature came from the carousel itself. Let me know your thoughts on this potential update.

omar-complex avatar Feb 04 '19 22:02 omar-complex

Hi! I like this idea - I'm wondering if it would make sense to make it configurable, in case someone does not want to disable autoplay after interacting with the carousel. I'm looking at the PR that was submitted today and I'll see how much more work it is to make it a configurable prop

sarmeyer avatar Jul 31 '20 18:07 sarmeyer