Skip to main content

Navigation transitions

Learn how to implement smooth navigation transitions in your Shop Mini. This guide covers MinisRouter setup, TransitionLink usage, and custom navigation patterns for creating fluid, app-like experiences.


Shop Minis support smooth navigation transitions, providing native app-like page transitions. When enabled, navigations slide smoothly between pages with configurable animations.

Key features:

  • Automatic animations: Forward navigation slides from right, back navigation slides from left
  • Gesture support: Detects iOS swipe gestures and Android back button for appropriate animations

To enable navigation transitions in your Shop Mini, wrap your app with MinisRouter and set the viewTransitions prop:


Shop Minis provides two main ways to navigate with transitions:

Use TransitionLink for declarative navigation links:


Anchor to Programmatic NavigationProgrammatic Navigation

Anchor to useNavigateWithTransition HookuseNavigateWithTransition Hook

For programmatic navigation with transitions, use the useNavigateWithTransition hook:


When navigating back (pop/back button), the old page slides right and fades out, and the previous page slides in from the left. This is automatically triggered by iOS swipe gesture or Android back button. You can programmatically navigate back by using the useNavigateWithTransition hook with a negative number.


  • Use TransitionLink for static navigation: TransitionLink is optimized for declarative navigation
  • Batch state updates: Perform state updates before navigation to avoid mid-transition renders
  • Respect prefers-reduced-motion: The default styles disable animations when users prefer reduced motion

  • Transitions automatically respect the prefers-reduced-motion media query
  • Ensure focus management across page transitions
  • Provide clear visual feedback during navigation

You can prevent navigation by using custom click handlers:


Anchor to Transitions Not WorkingTransitions Not Working

  1. Check viewTransitions prop: Ensure MinisRouter has viewTransitions enabled
  2. Navigating backwards: Check if you are using the useNavigateWithTransition(-1) hook to navigate backwards
  3. Absolute URLs: TransitionLink warns about absolute URLs - use relative paths

  • Jumpy transitions: Ensure consistent layouts between pages
  • Missing animations: Check CSS isn't overriding transition styles
  • Performance: Large DOM changes during transition can cause stuttering

Was this page helpful?