Is there any way to have an infinite image slider like the one below, only using TailWindCss
, ReactJS
, and plain JS
. I am trying to make a component out of this, here is the code so far:
import React from "react";
export default function scrollImagesRight(props) {
return (
<div className="w-full bg-red-100 h-[200px]">
<ul>
<li>Image 1</li>
<li>Image 2</li>
<li>Image 3</li>
<li>Image 4</li>
<li>Image 5</li>
<li>Image 6</li>
<li>Image 7</li>
<li>Image 8</li>
</ul>
</div>
);
};
props will contain the image URL, and the li will not have text, it will have the images sent through the props.
Here is what I am trying to achieve: youtube video link