--- title: TransitionGroup Does Not Support Transition Modes impact: LOW impactDescription: Developers expecting mode prop from Transition will find it doesn't work type: gotcha tags: [vue3, transition-group, animation, mode, in-out, out-in] --- # TransitionGroup Does Not Support Transition Modes **Impact: LOW** - Unlike ``, the `` component does not support the `mode` prop (`in-out` or `out-in`). This is because `` handles multiple elements that can enter and leave simultaneously, rather than alternating between mutually exclusive elements. If you need sequenced enter/leave behavior, you must implement it manually with JavaScript hooks or rethink your animation approach. ## Task Checklist - [ ] Do not use `mode` prop on `` (it will be ignored) - [ ] For sequential animations, use JavaScript hooks with delays - [ ] For single element alternation, use `` instead - [ ] Consider staggered animations as an alternative to mode-based sequencing **Incorrect - mode prop is ignored:** ```vue ``` ## When to Use Transition vs TransitionGroup | Scenario | Component | |----------|-----------| | Single element toggling (v-if) | `` | | Alternating between two components | `` with `mode` | | List of items (v-for) | `` | | Multiple simultaneous animations | `` | **Single element - use Transition with mode:** ```vue ``` **List of elements - use TransitionGroup:** ```vue ``` ## Simulating Sequential Behavior If you need items to leave before new items enter, use JavaScript hooks: ```vue ``` ## Staggered Animation Alternative Instead of sequential mode behavior, consider staggered animations for a polished effect: ```vue ``` ## Reference - [Vue.js TransitionGroup](https://vuejs.org/guide/built-ins/transition-group.html) - [Vue.js Transition Modes](https://vuejs.org/guide/built-ins/transition.html#transition-modes)