docs: add demo for view transitions api

This commit is contained in:
Sébastien Chopin 2024-01-10 18:04:07 +01:00
parent 2b417356ba
commit 3c5ea3457c

View File

@ -414,6 +414,8 @@ Remember, this page transition cannot be overridden with `definePageMeta` on ind
Nuxt ships with an experimental implementation of the [**View Transitions API**](https://developer.chrome.com/docs/web-platform/view-transitions) (see [MDN](https://developer.mozilla.org/en-US/docs/Web/API/View_Transitions_API)). This is an exciting new way to implement native browser transitions which (among other things) have the ability to transition between unrelated elements on different pages.
You can check a demo on https://nuxt-view-transitions.surge.sh and the [source on StackBlitz](https://stackblitz.com/edit/nuxt-view-transitions).
The Nuxt integration is under active development, but can be enabled with the `experimental.viewTransition` option in your configuration file:
```ts [nuxt.config.ts]