Carousel using variables

Hello everyone,

I’d like to make a carousel using variables. My aim is to scroll through the different variants of my component using the arrows. I don’t want to disable the arrows, so I’ll return to my first variant when I’ve viewed them all. In this example, I have 3 variants, but if the solution could work with an infinite number of variants, that would be great. I’ve tried a lot of things without success, so I’m wondering if it’s really possible.

I’ve used a String variable to change my variants, but I have the impression that even using conditions it’s impossible to say
IF RED shoes → put GREEN
IF GREEN → put WHITE
IF WHITE → put RED

At least I haven’t found the solution.

Thanks for your help

Can you share the file for us to take a look?

Of course, here’s a screen of what’s working best so far. I can switch between my 3 variants, but only once…

and here is the file : https://www.figma.com/design/liViFWV1WanUuzVFl9S4t2/Untitled?node-id=0-1&t=nj4UomgaIRxwkWpS-1