Route Transitions
FreeTransition between application routes without delaying the next page or double-mounting data.
Purpose
Keep navigation feeling immediate while avoiding blank flashes.
Procedure
--- name: route-transitions description: Transition between application routes without delaying the next page or double-mounting data. ---
Route Transitions
Purpose
Keep navigation feeling immediate while avoiding blank flashes.
Procedure
Do not add a fixed timeout before showing the next page. The transition waits on the router, not on a design duration.
Preferred pattern for an application:
- Keep the outgoing page visible while the next route's data loads.
- If loading exceeds a short moment, show a slim pending indicator on the existing chrome (the header), not a full-page skeleton that flashes on fast navigations.
- When the next route is ready, swap. A 150ms opacity crossfade is optional. Skip it under reduced motion.
Do not animate both pages in a stack if that means fetching twice or losing scroll restoration. Honor the router's scroll behavior.
The back button returns to the previous scroll position. Do not reset the world on every param change that should only refresh a list.
Never block the URL update behind an animation. The address bar is the source of truth.
Example requests
1. Pending navigation
Request: Apply Route Transitions. Show the current page until the next route is ready, then swap. Expected: No artificial delay. A pending indicator if the loader is slow.
Dependencies
None. Work in the repository that is already open. Do not add packages unless the procedure names one.
Compatibility
This document follows the Agent Skills layout (a folder named route-transitions containing SKILL.md). Claude Code, Cursor, Codex, and Gemini CLI can load that file from the paths in the Skilling installation guide. GitHub Copilot does not load SKILL.md. Use the Copilot instructions copy, and narrow applyTo before you commit it.
Example prompts
Pending navigation
Apply Route Transitions. Show the current page until the next route is ready, then swap.
Expected: No artificial delay. A pending indicator if the loader is slow.
Choose the agent
This skill is installed for one agent at a time. Pick the section you are using.
Related
- Enter and Exit
Mount and unmount panels so they fade or slide without leaving invisible focus traps.
- Empty, Loading, Error
Specify the three non-happy states for any list or detail view so the UI never goes blank.
- Motion Rules
Add motion only to explain a change: 150–250ms, ease-out, and a reduced-motion path.
Reviews
No reviews yet.
Sign in to review.
Report a problem
Inaccurate steps, an unsafe instruction, or a licensing concern.
Sign in to report.