files/en-us/web/api/view_transition_api/index.md
{{DefaultAPISidebar("View Transition API")}}
The View Transition API provides a mechanism for easily creating animated transitions between different website views. This includes animating between DOM states in a single-page app (SPA), and animating the navigation between documents in a multi-page app (MPA).
View transitions are a popular design choice for reducing users' cognitive load, helping them stay in context, and reducing perceived loading latency as they move between states or views of an application.
However, creating view transitions on the web has historically been difficult:
The View Transition API provides an easy way of handling the required view changes and transition animations for both the above use cases.
Creating a view transition that uses the browser's default transition animations is very quick to do, and there are features that allow you to both customize the transition animation and manipulate the view transition itself (for example specify circumstances under which the animation is skipped), for both SPA and MPA view transitions.
See Using the View Transition API for more information.
<link rel="expect">
@view-transition is used to opt in the current and destination documents to undergo a view transition.view-transition-name.match-element demo: An SPA featuring animated list items, demonstrating the use of the match-element value of the view-transition-name property to animate individual elements.{{Specifications}}
{{Compat}}