Route Transitions
With Nuxt, you can create page animates that get fired when leaving a page and when entering a page. The Nuxt Brothers, Seb, and Alex have carefully thought of everything that you may need for your application and made it easy for developers. One of the minor features that Nuxt has over its competitors is it’s attention to its API, specifically how you can leverage it to create “native-like” application animations between pages.
As part of it’s API, Nuxt provides standard classes that you can activate by adding styles too. These classes will be applied automatically for you when leaving or entering a page.
Basic Usage
You can add global styles for any route change. Out of the box, Nuxt provides the .page-enter-active
, .page-leave-active
, .page-enter
, and .page-leave-to
classes that you can leverage. In order for these to work, you will need to create a .css
stylesheet into the assets
directory and modify the nuxt.config.js
to register it...