Swup is a versatile and extensible page transition library for server-rendered websites. It manages the complete page load lifecycle and smoothly animates between the current and next page. In addition, it offers many other quality-of-life improvements like caching, smart preloading, native browser history and enhanced accessibility.
Make your site feel like a snappy single-page app — without any of the complexity.
- ✏️ Works out of the box with minimal markup
- ✨ Auto-detects CSS transitions & animations for perfect timing
- 🔗 Updates URLs and preserves native browser history
- 🏓 Manages scroll position between pages and anchor links
- 🚀 Uses a cache to speed up subsequent page loads
- 📡 Offers hooks to customize and extend the page load lifecycle
- 🔌 Has a powerful plugin system and many official and third-party plugins
- 🎨 Provides ready-to-go themes to get started quickly
See How it works for an overview of the key concepts.
Explore our interactive demos to see swup in action.
Swup is small by design. Extended features can be added via plugins:
- Display a progress bar while loading
- Enable smooth scrolling between visits
- Update meta tags and stylesheets after page loads
- Add support for preloading pages in the background
- Perform your animations in JS instead of CSS transitions
- Animate form submissions
- Improve accessibility for screen readers
- Get help in debug mode
Swup is released under the MIT license.