page-transitions
Installation
SKILL.md
Page Transitions Skill — Product-Grade Route Animations
Page transitions are what make a web app feel like a native app. The wrong transition breaks immersion instantly. This skill implements them at the level of Vercel, Linear, and Notion.
Principles
- Transitions carry context: a slide-left/right implies navigation depth; a crossfade implies a peer swap
- Consistent direction: deeper pages slide in from the right; going back slides right → left
- Never block content: the transition should complete in ≤ 500ms
- Shared elements (same element morphing between routes) are the most premium technique
Next.js App Router: Route transitions with Framer Motion
// app/template.tsx (template.tsx re-mounts on every route change, layout.tsx does not)
'use client'
import { motion } from 'framer-motion'