Feature: Infinite
See original GitHub issueHi there.
Love the implementation and declarative style of this library. The only thing keeping my company and I from using this lib is that its missing the infinite
option (see https://react-slick.neostack.com/). The feature is essentially: if we're currently on the last slide and the user hits the next button, go to the first set of slides. if we're on the first set of slides and the user hits the back button, go to the last set of slides
. All around, it is a better user experience than completely disabling the next/back buttons.
Example:
I’ve started to implement the feature as you can see above, and it seems like it’ll take minimum effort to add the feature. Looking for your thoughts on adding this feature before I go any further to support edge cases (e.g. where the total number of slides is not divisible by the visible slides) and add tests.
EDIT:
This is an optional prop. Without passing the prop, you get the original functionality.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:13 (6 by maintainers)
Top GitHub Comments
Currently, the slider, after the last slide, goes through all the slides till the first to start again.
What is desired is after the last slide, slider goes to first slide as if its the next slide seamlessly. How to achieve this?
Hello guys, small question about this. 😃
If we’re currently on the last slide and we hit next button, is it possible to go to the first slide without slider going all back to it, but to slide to it normally, so that the first slide appear immediately after the last slide?