docs.rodeo

MDN Web Docs mirror

View Transition API

{{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).

Concepts and usage

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.

Interfaces

Extensions to other interfaces

HTML additions

CSS additions

At-rules

Properties

Pseudo-elements

Examples

Specifications

{{Specifications}} 

Browser compatibility

{{Compat}} 

See also

In this article

View on MDN