Route transition
The part of a page transition that is the same whatever it looks like: cover, ask the router for the page, wait for it, uncover. From components/motion/useRouteTransition.tsx. The second site covers the screen with twenty-one bars and the fourth with its navigation; both now run on this.
const { go } = useRouteTransition({
root: "/",
leave: () => cover.animate(up, timing).finished,
enter: () => cover.animate(away, timing).finished,
});
<RouteTransitionProvider go={go}>
<TransitionLink href="/about">About</TransitionLink>
</RouteTransitionProvider>- Go to the second page the curtain plays
- Go to the notes on the second page it opens already scrolled there
- A link to this page scrolls to the top; no curtain
- A link out of the demo outside the root; no curtain
A tall block, so there is somewhere to scroll from.