View Transitions API with Turbo Router


is it somehow possible to use the View Transitions API with the Turbo Router?
e.g. something like this:

addEventListener("page:before-render", (event) => {
    if (document.startViewTransition) {
        const originalRender = event.detail.render
        event.detail.render = (currentElement, newElement) => {
            document.startViewTransition(() => originalRender(currentElement, newElement))

There is a section on this here:

perhaps this would also be conceivable for october?

Hey @Amin

Yes, indeed, we have this on our internal tracker. We plan to review and integrate these features in an upcoming minor release.

1 Like