Hi there, I want to animate each text of an array sequentially e.g. the first index should animate fade-in and then fade-out, continue to the next index and repeat the same animation, if it reached the end of array it will repeat the timeline, basically a looping animation.
At the same time I want to make the container animate its width based on the text inside, while animating the parent so it seems like smoothly slide to center no matter how long the animated text is.
Here I provide an example from this website https://www.cosmos.so/ in the hero section there's a paragraph "A pinterest alternative for [animated text]"
This is the codepen of the element structure that I found on their website, it might give some additional context.