Post

To animate a transition, you can add <ViewTransition> around part of the app to declare “what” to animate. ViewTransition activates "when" an update is caused by an animation trigger like startTransition, useDeferredValue, or Suspense, and "how" to animate is defined in CSS.

Adding <ViewTransition> around part of the app cross-fades the content by default:

0 reposts6 likes

For shared element transitions, you can add a “name”. This will animate an item from one part of the app to another: <ViewTransition name={id}>