Transition properties
Set the default properties of the page and layout transitions.
The pageTransition Property
Nuxt v2.7.0 introduces key "pageTransition" in favor of the "transition" key to consolidate the naming with layout transition keys.
-
Type:
StringorObject
Used to set the default properties of the page transitions.
Default:
{
name: 'page',
mode: 'out-in'
}
export default {
pageTransition: 'page'
// or
pageTransition: {
name: 'page',
mode: 'out-in',
beforeEnter (el) {
console.log('Before enter...');
}
}
}
The transition key in nuxt.config.js is used to set the default properties for the page transitions. To learn more about the available keys when the transition key is an object, see the pages transition property .
The layoutTransition Property
-
Type:
StringorObject
Used to set the default properties of the layout transitions. The value provided in the
nameoption is configured to work with the name provided inlayoutfrom yourlayoutsfolder.
Default:
{
name: 'layout',
mode: 'out-in'
}
export default {
layoutTransition: 'layout'
// or
layoutTransition: {
name: 'layout',
mode: 'out-in'
}
}
.layout-enter-active,
.layout-leave-active {
transition: opacity 0.5s;
}
.layout-enter,
.layout-leave-active {
opacity: 0;
}
Sébastien Chopin
Nazaré da Piedade
Nobu
川音리오
Maciek Palmowski
Nestor Vera
Daniel Roe
Yue Yang
Jeronimas
Clément Ollivier
Alexander Lichter
N3-rd
Adrien Zaganelli
Mag
Stefan Huber
Olga Bulat
Paiva
Florian Reuschel
Savas Vedova
HIJACK
Vinícius Alves
Kareem Dabbeet
Valentín Costa
Ryan Skinner
Alex Hirzel
Ajeet Chaulagain
René Eschke
Nico Devs
Muhammad
Naoki Hamada
Tom
Yann Aufray
Anthony Chu
Nuzhat Minhaz
Lucas Portet
Richard Schloss
Bobby
bpy
Antony Konstantinidis
Hibariya
Jose Seabra
Eze
Florian Lefebvre
Lucas Recoaro
Julien SEIXAS