react-snap-carousel icon indicating copy to clipboard operation
react-snap-carousel copied to clipboard

Suggestion: Add mouse click + drag support

Open Apestein opened this issue 9 months ago • 2 comments

Hi there, really great job with this library. It's the most flexible/customizable carousel I've seen. Only one problem though, no touch/drag scroll support. I managed to get it working by combining it with another library but unfortunately combining them will break the snap functionality. Check this out. This would be a gamer if we could get it working.

Apestein avatar Sep 22 '23 15:09 Apestein

Have you tried the demo on mobile? It already has drag touch support through the virtue of using native scrolling.

Try it here https://richardscarrott.github.io/react-snap-carousel/?path=/story/carousel--default

Native scroll provides the best experience across devices IMO. It works great on desktop, especially with trackpads and works well on tablets / mobile devices with native scrolling physics.

One thing you can't do is click + drag with a mouse but personally that's kinda clumsy IMO, so if the user doesn't have a decent mouse input (e.g. macbook trackpad) they can use the carousel controls w/ the arrows / pagination controls.

richardscarrott avatar Sep 24 '23 13:09 richardscarrott

Have you tried the demo on mobile? It already has drag touch support through the virtue of using native scrolling.

Try it here https://richardscarrott.github.io/react-snap-carousel/?path=/story/carousel--default

Native scroll provides the best experience across devices IMO. It works great on desktop, especially with trackpads and works well on tablets / mobile devices with native scrolling physics.

One thing you can't do is click + drag with a mouse but personally that's kinda clumsy IMO, so if the user doesn't have a decent mouse input (e.g. macbook trackpad) they can use the carousel controls w/ the arrows / pagination controls.

That's true but mouse drag is just nice to have. Could be implemented in a way that would preserve native mobile scroll and only activate for desktop.

Apestein avatar Sep 24 '23 17:09 Apestein