Taxi is a 🤏 small and 🐊 snappy js library for adding slick PJAX navigation and beautiful transitions to your website.
It was designed as a drop-in replacement (with enhancements) for Highway.js, which is sadly no longer maintained.
Improvements over Highway:
- URL-based routingPerfect for working with WebGL websites, you can now specify unique transitions for every possible navigation.
- Page cache managementPerfect for archives and search result pages, you can now preserve changes made to the DOM by user interaction.
- Ability to preload URLsFirst-class support for adding pages to the cache ahead of schedule.
- Blocks navigation during an active transitionStop users from performing state-breaking navigation by default.
- Previous page's content is automatically removed (you can opt out of this if you like)Clean code, clean mind.
- Click events on links can be intercepted via
stopPropagationwithout hacksThis finally works as you expect.
Differences to Highway
- Different public APICheck it out on the API & events reference.
- Different data attributes
data-taxi-ignoreare to be used instead of
data-router-disabledrespectively. See how to use for more.
detachare no longer methodsLink clicks are listened to via delegation so these are no longer needed.
navigateToIt always felt weird as a method name, and now it doesn't.
- Renderers now have an
initialLoadmethodNice and simple.
- Old content is automatically removed during a transitionYou can opt of this behaviour if you like via the allowInterruption option.