demo · v137

MPA & cross-document decision tree

Answer four questions about your app: the tree picks the right combination of view-transition-name, view-transition-class, and @view-transition rules — including when not to use match-element.

1. SPA or MPA?

SPA means same document, you call document.startViewTransition. MPA = cross-document, browser drives the transition.

2. Do source and destination elements share DOM identity?

Yes, when nodes persist across the snapshot. No when one route renders a different DOM subtree from another.

3. How many candidate elements share that role per page?

Single hero, list of items, or a tree of nested same-class elements.

4. Should the list reorder during the transition?

Reordering = position-based matching breaks down; need stable identity.

see also