You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/01-app/03-api-reference/05-config/01-next-config-js/viewTransition.mdx
+6-7Lines changed: 6 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: Enable ViewTransition API from React in App Router
4
4
version: experimental
5
5
---
6
6
7
-
`viewTransition` is an experimental flag that enables the new experimental [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) in React. This API allows you to leverage the native View Transitions browser API to create seamless transitions between UI states.
7
+
`viewTransition` is an experimental flag that enables the new [View Transitions API](https://developer.mozilla.org/en-US/docs/Web/API/View_Transition_API) in React. This API allows you to leverage the native View Transitions browser API to create seamless transitions between UI states.
8
8
9
9
To enable this feature, you need to set the `viewTransition` property to `true` in your `next.config.js` file.
10
10
@@ -19,19 +19,18 @@ const nextConfig = {
19
19
module.exports= nextConfig
20
20
```
21
21
22
-
> Important Notice: This feature is not developed or maintained by the Next.js team — it is an experimental API from the React team. It is still in **early stages** and **not recommended for production use**. The implementation is still being iterated on, and its behavior may change in future React releases.
23
-
> Enabling this feature requires understanding the experimental nature of the API. To fully grasp its behavior, refer to the [React pull request](https://github.com/facebook/react/pull/31975) and related discussions.
22
+
> Important Notice: The `<ViewTransition>` Component is already available in React's Canary release channel.
23
+
> `experimental.viewTransition` is only required to enable deeper integration with Next.js features e.g. automatically
24
+
> [adding Transition types](https://react.dev/reference/react/addTransitionType) for navigations. Next.js specific transition types are not implemented yet.
24
25
25
26
## Usage
26
27
27
-
Once enabled, you can import the `ViewTransition` component from React in your application:
28
+
You can import the [`<ViewTransition>` Component](https://react.dev/reference/react/ViewTransition) from React in your application:
However, documentation and examples are currently limited, and you will need to refer directly to React’s source code and discussions to understand how this works.
34
-
35
34
### Live Demo
36
35
37
36
Check out our [Next.js View Transition Demo](https://view-transition-example.vercel.app) to see this feature in action.
0 commit comments