Complete the code to import the Vue TransitionGroup component correctly.
<script setup> import { [1] } from 'vue' </script>
Transition instead of TransitionGroup.The TransitionGroup component is imported from 'vue' to enable list transitions.
Complete the template to wrap the list items with the TransitionGroup component.
<template> <[1] tag="ul" name="fade"> <li v-for="item in items" :key="item.id">{{ item.text }}</li> </[1]> </template>
transition instead of transition-group.div or template tag instead.The transition-group tag is used in templates to animate list items.
Fix the error in the TransitionGroup usage by completing the missing attribute.
<template> <transition-group [1]="ul" name="slide"> <li v-for="item in list" :key="item.id">{{ item.name }}</li> </transition-group> </template>
type or mode instead of tag.tag attribute causing invalid HTML.The tag attribute tells transition-group which HTML element to render as the wrapper.
Fill both blanks to create a fade transition with correct CSS classes.
<style scoped> .fade-[1] { opacity: 0; transition: opacity 0.5s ease; } .fade-[2] { opacity: 1; } </style>
leave-active with enter-active.leave-to instead of enter-to for fade-in.The enter-active class defines the transition timing, and enter-to sets the final visible state.
Fill all three blanks to correctly bind the list and handle item removal with a key.
<template> <transition-group tag="ul" name="list"> <li v-for="[1] in [2]" :key="[3].id"> {{ [3].text }} </li> </transition-group> </template>
The v-for loops over items with item as the variable, and the key uses item.id.