Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Interface ViewTransition

The ViewTransition interface of the View Transition API represents an active view transition, and provides functionality to react to the transition reaching different states (e.g., ready to run the animation, or animation finished) or skip the transition altogether.

MDN Reference

interface ViewTransition {
    finished: Promise<void>;
    ready: Promise<void>;
    types: ViewTransitionTypeSet;
    updateCallbackDone: Promise<void>;
    skipTransition(): void;
}
Index
finished: Promise<void>

The finished read-only property of the ViewTransition interface is a Promise that fulfills once the transition animation is finished, and the new page view is visible and interactive to the user.

MDN Reference

ready: Promise<void>

The ready read-only property of the ViewTransition interface is a Promise that fulfills once the pseudo-element tree is created and the transition animation is about to start.

MDN Reference

The types read-only property of the ViewTransition interface is a ViewTransitionTypeSet that allows the types set on the view transition to be accessed and modified.

MDN Reference

updateCallbackDone: Promise<void>

The updateCallbackDone read-only property of the ViewTransition interface is a Promise that fulfills when the promise returned by the document.startViewTransition() method's callback fulfills, or rejects when it rejects.

MDN Reference

  • The skipTransition() method of the ViewTransition interface skips the animation part of the view transition, but doesn't skip running the associated view update.

    MDN Reference

    Returns void

Was this helpful?