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

Hiding Next and Previous buttons when First or Last items are active #1028

Closed kuldeepDamco closed 2 months ago

kuldeepDamco commented 11 months ago

Questions

question : suppose we have const items = [10]; // 10 images on the window we only want to show 3 images. that means for the last image we need to click the next button 2/3 times. so at the time of the last image(10th image ), we don’t have further data (infinite scrolling = false ) so I want to hide the next button in this. user can only see the previous button and vice versa.

danilofuchs commented 10 months ago

I believe you can use a custom renderCenterLeftButton to check for the indexes

carbonrobot commented 2 months ago

This feature is now the default in v8