Automatic scroll restoration
TanStack Router automatically scrolls to top on navigation by default:Scroll restoration options
Configure global scroll behavior:Per-route scroll behavior
Override scroll behavior for specific routes:Custom scroll restoration
Implement custom scroll logic:Scroll to hash
Automatically scroll to hash fragments:Programmatic scrolling
Control scroll position during navigation:Preserve scroll on navigation
Keep scroll position when navigating:Smooth scrolling
Use smooth scroll behavior:Scroll on route update
Scroll when route params change:Scroll position tracking
Track scroll position for analytics:Scroll restoration with layouts
Handle scroll in nested layouts:Skip to content
Implement accessibility skip links:Infinite scroll
Implement infinite scroll with scroll restoration:Best practices
Preserve scroll for pagination
Preserve scroll for pagination
Use
resetScroll={false} when navigating between pages of content.Test on mobile devices
Test on mobile devices
Scroll behavior can differ significantly on mobile - always test there.
Common patterns
Scroll to top button
Remember scroll position
Next steps
Navigation
Learn navigation patterns
Link component
Explore Link API