gs-shop / vue-slick-carousel

🚥Vue Slick Carousel with True SSR Written for ⚡Faster Luxstay
https://gs-shop.github.io/vue-slick-carousel/
Other
801 stars 186 forks source link

Rtl should affect programmatical navigation #243

Open Yahohoo opened 2 years ago

Yahohoo commented 2 years ago

When I use the rtl option of the carousel its slides reorder to match the rtl usability priciples. This package will work well if I use default or slot arrows just because these arrow positions are at the sides of the carousel. But if I use the custom controls outside of the carousel and prev and next methods like this.$refs.carousel.next it will work like in the ltr mode. For users of rtl language "next" button should move the carousel to the next left slide. That’s why I need to choose methods based on my app current language direction to make it work right and thus mess up code.

It also will apply to the indexes of slides and events like beforeChange if I use custom pagination outside of the carousel.

I know it’s a breaking change, maybe it would be enough to add an option like the rtlNavigation.

Iran-110 commented 9 months ago

Hi, react-slick and vue-slick-carousel did not truly implemented the RTL feature. For supporting the RTL feature, I changed some functions and created a new fork based on vue-slick-carousel. You can use it from vue-slick-carousel-rtl.