Skip to main content

Auto Scrolling

It is easy implement auto scrolling by using ref to the Slider component and then call class function slideTo() to achieve auto sliding by yourself.

Since slider itself maintains its current slider index, so you also need to create a local variable to sycn with the slider's inner current slide index using onSlide callback to update your local current slide index.

Example on Code Sandbox: