Customize with CSS

Name the DOM element you mutated.

h1 {
  view-transition-name: replace-effect;
}

::view-transition-old(replace-effect) {
  animation: var(--animation-scale-down);
}

::view-transition-new(replace-effect) {
  animation: var(--animation-slide-in-up);
}

Get access to the old and new states

See a demo