Export
View transitions
Two different things share this name. The View Transitions API animates snapshots of two pages, and a shared-element transition moves one element that exists on both. Both are under Navigation in the export dialog, as Whole view and Shared element.
- The API animates snapshots
- The browser captures the old page, renders the new one, and animates between them. Your keyframes go onto
::view-transition-new(name), which takesanimationlike any other selector. - Shared elements are the hard one
- An element that exists on both sides and should appear to travel:
view-transition-namein CSS,layoutIdin Motion. It’s what people usually mean by “page transition”, and it needs both pages to cooperate. - Where it isn’t supported
- The CSS exports use the browser’s View Transitions API. The trigger that comes with the Whole view export checks for
document.startViewTransitionfirst, and in a browser without it the navigation is instant: no transition, and nothing broken. Motion’s versions (layoutId, and a cross-fade inside one React tree) don’t use the API. Check support in the browsers you target before you rely on the CSS one.