Reactivity Fundamentals
Vue.js uses built-in component in response to changing state (effect):
Transition classes:
v-enter-from:
Initial state for entering elements, added before insertion, and removed shortly after.
v-enter-active:
Active state during entering, added before insertion, and removed when the transition finishes. Use it to set duration, delay, and easing.
v-enter-to:
Ending state for entering, added one frame after insertion, and removed when the transition finishes.
v-leave-from:
Starting state for leaving, added immediately when leaving starts, and removed after one frame.
v-leave-active:
Active state during leaving, added immediately when leaving starts, and removed when the transition finishes. Use it to set duration, delay, and easing.
v-leave-to:
Ending state for leaving, added one frame after leaving starts, and removed when the transition finishes.
Basic implementation
the v is bind to the v in v-if
JavaScript Hooks
we can hook the transition process with JavaScript by listening to event in component:
Official documentation website
https://vuejs.org/guide/built-ins/transition.html
Last updated