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
3.06k stars 594 forks source link

Direction of Carousel Sliding #1052

Open chipmunk25 opened 5 months ago

chipmunk25 commented 5 months ago

Is there an existing issue for this?

Code of Conduct

Feature Request

I have been utilizing the carousel and have observed that with wrapMode="wrap", the slider transitions smoothly from left to right. However, upon reaching the last slide and clicking 'next', it abruptly changes direction, moving from right to left. Is there a way to ensure consistent directional movement throughout? Currently, the navigation flips abruptly from right to left when looping back to the first slide. Can the navigation move smoothly in the same direction when transitioning back to the first slide? Additionally, is there a method to make the carousel behave in a circular manner instead of stopping abruptly at the end?

carbonrobot commented 5 months ago

Thanks for the request @chipmunk25.

We will be introducing a new option for wrapMode called infinite which will use the same scroll as v7 and will work in a circular fashion by seamlessly inserting the first slide at the end of the carousel when you reach the last slide. We are currently planning how this option works with other options like dots while still preserving the responsive nature of the containers.