Open dannycherry opened 1 year ago
Hi, currently react-stacked-center-carousel indeed does not have autoplay functionality. However, you can create a function that utilizes setTimeout
to call itself and ref.goNext()
every few seconds.
Thanks for your suggestion though!
I am currently very busy with school and internship but I will definitely consider implementing auto-play once things start to slow down a bit for me.
@BotDanny Sure, thanks for feedback, i already created it. The package you created solved me many things, so thank you for that also. If you plan to create it, consider these things to stop/pause when user hover the carousel. Reset the counter when user changes slide either on arrows or clicking slides.
And one also request, in
Hi, currently react-stacked-center-carousel indeed does not have autoplay functionality. However, you can create a function that utilizes
setTimeout
to call itself andref.goNext()
every few seconds. Thanks for your suggestion though! I am currently very busy with school and internship but I will definitely consider implementing auto-play once things start to slow down a bit for me.
Can you add this feature?
Im developing a react web app and I achieved the autoplay by setting a useEffect for a Interval!
`useEffect(() => { const autoplayInterval = setInterval(() => { if (carouselRef.current) { carouselRef.current.goNext(); } }, 3500);
return () => {
clearInterval(autoplayInterval);
};
}, []);`
I read the props and could not find it, does it exists at all autoplay functionality? If no, would be a great feature for it.