My goal is to create a looped row of elements, similar to this design:
https://i.sstatic.net/7cC2z.png
This row should function like a carousel where clicking the "Next" button changes the current element and positions it in the center of the row. I envision this row as being looped, with the beginning and end connected seamlessly. I'm unsure if CSS has a way to curve divs or if JavaScript would be needed for this.
I have an array of elements in JS:
const elements = ["One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten"];
The row is initialized with this array in HTML:
<div id="loopedRow">
<span>One</span>
<span>Two</span>
<span>Three</span>
<span>Four</span>
<span>Five</span>
<span>Six</span>
<span>Seven</span>
<span>Eight</span>
<span>Nine</span>
<span>Ten</span>
</div>
If anyone could provide guidance on how to achieve this effect, I would greatly appreciate it.