Level 15
Apparently vue supports this out of the box: https://vuejs.org/guide/built-ins/transition-group.html#staggering-list-transitions
From what I gather, the only thing you're missing is adding a :data-index attribute to your li and then use the onEnter hook to trigger the transition staggering. Something like this:
<transition-group
name="staggered-fade"
tag="ul"
v-on:enter="fadeIn">
<li v-for="(item, index) in list" :key="index" :data-value="index">{{item.name}}</li> //fadeIn
</transition-group>
And this in your <script>:
function onEnter(el, done) {
gsap.to(el, {
opacity: 1,
height: '1.6em',
delay: el.dataset.index * 0.15,
onComplete: done
})
}
I'm not an expert and I haven't tried is. But do let me know if it works!