Currently, I am attempting to implement an infinite horizontal scroll section in vuejs for a selection of products. However, I am facing difficulties achieving the infinite effect. My approach so far involved removing the card that goes out of view and adding it back as the last card. Unfortunately, this method resulted in a strange snapping effect instead of the desired smooth scroll.
If you are interested, you can view a CodePen here showcasing the smooth scroll using scrollTo
with the behaviour set to smooth
.
I would appreciate any suggestions or recommendations for a better alternative to simply removing and adding a card to the end to achieve the infinite scroll effect. Thank you!