This is Part 1 of our series on “The Future of Astro” covering three major new features we have planned for Astro in 2024. This post introduces a

Zero-JavaScript View Transitions

submited by
Style Pass
2024-06-11 23:30:05

This is Part 1 of our series on “The Future of Astro” covering three major new features we have planned for Astro in 2024. This post introduces an update to the View Transitions API that Astro can now leverage for native, app-like page navigation without a single line of JavaScript required.

This is Part 1 of our series on “The Future of Astro” covering three major new features we have planned for Astro in 2024. This post introduces an update to the View Transitions API that Astro can now leverage for native, app-like page navigation without a single line of JavaScript required.

The View Transitions API is a set of new platform APIs that unlock native browser transitions between pages. Historically this has only been possible in JavaScript-heavy Single Page Applications (SPAs), but recent advances are now bringing native page transitions to the web platform.

Astro users have had early access to view transitions since Astro 2.9. Due to initial limitations in the browser, our early support worked by injecting a JavaScript router onto the page to manage the animations for you. This was never meant as a long-term solution, but it successfully created an early playground for our users to explore:

Leave a Comment