The View Transition API enables smooth animated navigation between pages in multi-page applications using just CSS. With the @view-transition at-rule, developers can create seamless page transitions that were previously only possible in single-page applications. The guide demonstrates how to implement basic cross-fade transitions with one line of CSS, then extends to custom slide animations using pseudo-elements like ::view-transition-old and ::view-transition-new. Currently supported in Chrome 126+, Edge 126+, and Safari 18.2+, with Firefox support coming soon.

5m read timeFrom developer.mozilla.org
Post cover image
Table of contents
Quick refresher on MPAs vs SPAsBrowser support for view transitionsCreating your first view transitionGoing beyond the default transitionWrapping up

Sort: