Umbra UI

PageTransition

Animates between pages or views.

Animatedimport { PageTransition } from 'umbra-ui/motion'

Props

PropTypeDefaultDescription
transitionKey requiredstring | number—Changes when the page changes, e.g. the pathname. A new key plays the exit, then the enter.
mode "wait" | "sync"wait`wait` finishes the exit before entering; `sync` overlaps them.
reducedMotion "system" | "always" | "never""system"Reduced-motion override. Under reduced motion every variant becomes a plain fade.
variant "scale" | "fade" | "slide"slideMovement style.

Usage notes

Key it by route. In the Next.js App Router, use it in a template.tsx.

Accessibility

  • Does not manage focus: move focus to the new page's heading yourself on navigation.
  • Under reduced motion every variant becomes a fade.

Import

import { PageTransition } from 'umbra-ui/motion';
import 'umbra-ui/styles.css'; // once, at the root of your app