HTML & CSS · Senior · Question 33 of 75

What is the View Transitions API?

Explanation

document.startViewTransition(() => updateDOM()) captures the old state, applies the changes and animates the transition via ::view-transition-old/new pseudo-elements, styled with regular CSS. MPAs get cross-document transitions via @view-transition. React 19.2 added a <ViewTransition> component.

Further reading

Problem with a question

HTML & CSS · Senior · question 33

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz