Open History to see the last commit
1import { createFileRoute } from '@tanstack/react-router'
2import { Link } from '@tanstack/react-router'
3β
4export const Route = createFileRoute('/explore')({
5 component: RouteComponent,
6})
7β
8function RouteComponent() {
9 return (
10 <div className="p-2 [view-transition-name:main-content]">
11 <h3>
12 Explore the CSS to see how to use active-view-transition-type to create
13 new viewTransitions to use with Tanstack Router.
14 </h3>
15 <h4 className={'text-sm mt-2 italic'}>
16 Disclaimer: View Transition Types may not be supported in all browsers
17 and will fall back to the default browser transition if not available.
18 </h4>
19 <div className="flex justify-center gap-10 mt-4">
20 <Link
21 to={'/how-it-works'}
22 // see styles.css for 'slide-right' transition
23 viewTransition={{ types: ['slide-right'] }}
24 className="font-bold"
25 >
26 <- Previous Page
27 </Link>
28 </div>
29 </div>
30 )
31}