Taxi.js is the spiritual successor to Highway.js.
npm i @unseenco/taxi or yarn add @unseenco/taxi
Taxi is a js library for adding AJAX navigation and beautiful transitions to your website.
It was designed as a drop-in replacement for Highway.js which is sadly no longer maintained.
- URL-based routing
- Better cache management
- Ability to preload URLs
- Blocks navigation during an active transition (can be opted out)
- Auto runs javascript on the new page
- Previous page's content is automatically removed (you can opt out of this if you like)
- Click events on links can be intercepted via
stopPropagationwithout hacks
- Different public API
- New methods and functionality
data-taxi,data-taxi-view,data-taxi-ignoreare to be used instead ofdata-router-wrapper,data-router-view,data-router-disabledrespectively.attachanddetachare no longer methods - link clicks are listened to via delegation so these are no longer needed.redirectis nownavigateToas "redirect" felt weird as a method name!- Renderers now have an
initialLoadmethod - The params passed to renderers, transitions, and events are now a little different
- Old content is automatically removed during a transition - so no need to manually call
from.remove()in your transitions.