'Sliding an image from top of a stack of images

I want to create a stack of images like that of spotify design homepage (https://spotify.design/) and remove them one by one on a set of timer. I have looked around everywhere but to no help. Can anyone send me a tutorial or some sort of help I'll be so glad.



Solution 1:[1]

This is hard to answer without knowing your abilities, but I would look into the z-index css properties and conditional rendering. each card can be at a different z-index and a function on a timer would pop the last one off, setting state to stop it from rendering conditionally.

representing the stack of cards in an array would make it easy to keep track of.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Nicholas Aponte