Lightweight & Themeable React Carousel with 500+ downloads, I kept it simple with 45 lines of logic controlling the whole package, super light weight for those situation when you just want the functionality.
In the current package, the images are changed based on the current index of the image array. On the next release, we'll loop over all image URLs and then scroll through them using the scroll snap
Loop over all image URLs using a flexbox; with overflow hidden on the parent container
Next and previous buttons will now scroll the container x (px) (x being the size of the container) ie. we might listen for the change in the container size and adjust the scroll offset by the current container width, something like document.querySelector(element).addEventListener('event').
The rest is really just testing the solution and see if it works; you have complete autonomy over this