Routeveil

Routeveil

React Router page transitions and shared-element animations with TypeScript support

Open Source

Gallery

About Routeveil

Routeveil is a transition engine for React Router that handles page animations, shared elements, and full-screen overlays. It lets you define per-navigation transitions while keeping your route components clean. The library is TypeScript-native and works with React 18, React 19, and React Router DOM versions 6.27 and above.

The core problem it addresses is that React Router handles navigation but not the visual transitions between routes. You can get from page A to page B, but making that movement feel smooth, with elements that persist across routes or pages that slide in and out, requires custom work. Routeveil provides the infrastructure for those effects without taking over your routing.

The library ships three main components. RouteveilView wraps your route content and manages the transition lifecycle. RouteveilLink replaces your navigation links and triggers the transitions. RouteveilSharedElement marks elements that should animate between routes, connecting them with unique identifiers. When you navigate, the exit animation plays, then shared elements move to their new positions, then the enter animation runs.

Shared element handling is where it gets useful. You mark an element on one page and a matching element on another, and Routeveil figures out how to animate between them. It handles multiple concurrent matches, crossfades between different element types, and gracefully skips missing or duplicate targets. The scroll management keeps incoming shared elements centered without breaking URL hash anchors.

Routeveil also provides programmatic hooks for triggering transitions outside of link clicks, plus deterministic cleanup for interrupted navigation. If a user clicks away mid-transition, it cleans up animations, overlays, and focus state properly. Reduced-motion support is built in for accessibility.

This fits frontend developers building React applications where navigation should feel polished rather than instant. Product pages that share images with listing pages, dashboards with expanding cards, apps where the transition itself communicates structure. The library is MIT licensed, free to use, and distributed through npm.

Key Features

  • Per-navigation transition customization
  • Shared element movement across routes
  • Full-screen overlay effects
  • Type-safe transition options
  • Programmatic navigation and playback hooks
  • Reduced-motion accessibility support

Pros & Cons

What we like

  • Works with both React 18 and React 19
  • Shared elements animate without wrapper components
  • Handles interrupted navigation cleanly
  • MIT licensed with no cost to use

Room for improvement

  • Requires React Router DOM 6.27 or higher
  • Depends on Web Animations API browser support
  • Smaller community as a newer library
  • Adds complexity to simpler navigation flows

Frequently Asked Questions

What is Routeveil?
Routeveil is a TypeScript transition engine for React Router. It handles page animations, shared element movement, and overlay effects during navigation, letting you define per-route transitions while keeping your components clean.
Is Routeveil free?
Yes, Routeveil is MIT licensed and free to use. It's distributed through npm and the source is available on GitHub.
What versions of React does Routeveil support?
Routeveil supports React 18.0.0 and higher, including React 19. It requires React Router DOM 6.27.0 or above and a browser with Web Animations API support.
How do shared elements work?
You mark elements on different routes with matching identifiers using the RouteveilSharedElement component. During navigation, Routeveil animates between them automatically, handling the movement, crossfades, and scroll positioning.

Best For

Building product pages with shared images from listingsCreating dashboard cards that expand into full viewsAdding polish to content-heavy applicationsImplementing mobile-style navigation in web apps

Featured in

Alternatives to Routeveil

View all

Reviews (0)

No reviews yet

Be the first to share your experience with Routeveil

Sign in to write a review

Badge builder

Add Routeveil to your website

Choose a badge style and size, preview it here, then copy the generated HTML. Badge images are self-contained SVGs and do not require an external script.

Routeveil badge preview
<a href="https://toolindex.net/tools/routeveil?ref=badge" target="_blank" rel="noopener">
  <img src="https://toolindex.net/badge/routeveil/medium.svg" alt="Routeveil - Listed on Tool Index" width="180" height="50" />
</a>

How to use the badge

  1. 1. Pick the style, size, and theme that fit your layout.
  2. 2. Copy the generated HTML from the code block.
  3. 3. Paste it into your footer, homepage, or press page.

Standard badge available

The standard listing badge is available now. Score and circle badges are limited to tools currently ranked in the top 10 of a category.

Badge clicks return visitors to this profile with a referral tag so the source remains identifiable.