Skip to content
Source
Sign inSign up
TanStack/router
Open History to see the last commit

index.tsx

25 lines666 Bytes

1import { createFileRoute } from '@tanstack/react-router'
2import * as React from 'react'
3import { Link } from '@tanstack/react-router'
4​
5export const Route = createFileRoute('/')({
6 component: Home,
7})
8​
9function Home() {
10 return (
11 <div className="p-2 [view-transition-name:main-content]">
12 <h3>Welcome To The View Transitions Example!</h3>
13 <div className="flex justify-center mt-4">
14 <Link
15 to={'/how-it-works'}
16 // see styles.css for 'slide-left' transition
17 viewTransition={{ types: ['slide-left'] }}
18 className="font-bold"
19 >
20 Next Page -&gt;
21 </Link>
22 </div>
23 </div>
24 )