FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
2.99k stars 594 forks source link

Better infinite scrolling behavior in a controlled carousel? #1041

Open bwong365 opened 6 months ago

bwong365 commented 6 months ago

Bugs and Questions

Prerequisites

Describe Your Environment

Describe the Problem

We have a carousel set up as a controlled component, via slideIndex. When using wrapAround, navigating past the last slide displays the first slide, which is expected, however the scroll direction goes to the left, as opposed to the right. Is there a way to continue controlling slideIndex, but to get this to scroll in a seamless looking fashion where the first slide still comes in from the right?

Codesandbox here