YIZHUANG / react-multi-carousel

A lightweight production-ready Carousel that rocks supports multiple items and server-side rendering with no dependency. Bundle size 2kb.
MIT License
1.25k stars 286 forks source link

Added "Rewind" option #334

Closed MaSchVam closed 2 years ago

MaSchVam commented 2 years ago

As proposed in #330 I have added a "Rewind" option (rewind bool prop) that can be utilized if infinite mode is not opted into, but autoplay explicitly is. When the last slide is hit with this configuration of props, the autoplay interval is reset and the carousel is set back to slide 0, with a potential custom transition duration and custom autoplay speed in mind.

YIZHUANG commented 2 years ago

Good stuff, can you also update the documentation as well?

YIZHUANG commented 2 years ago

Good stuff, can you also update the documentation as well?

MaSchVam commented 2 years ago

Good stuff, can you also update the documentation as well?

Thanks! I updated the README with the rewind prop, and added clarification to the infinite prop in the documentation as well, to make people aware of the fact that carousel items are cloned with this option.

MaSchVam commented 2 years ago

@YIZHUANG Let me know if I can do more.

YIZHUANG commented 2 years ago

I haven't tested this yet, but looks good, i will test it before making the release

YIZHUANG commented 2 years ago

@all-contributors please add @MaSchVam for code

allcontributors[bot] commented 2 years ago

@YIZHUANG

I've put up a pull request to add @MaSchVam! :tada: