awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
swup avatar

swup/swup

0
View on GitHub↗
5,191 stars·198 forks·TypeScript·MIT·21 viewsswup.js.org↗

Swup

Swup is a page transition library and AJAX page loader designed to create seamless, animated transitions between pages on server-rendered websites. It functions as a DOM content orchestrator and browser history manager, intercepting navigation to replace page content dynamically and simulate a single-page application experience.

The project differentiates itself through a hook-based lifecycle system and a plugin architecture that allows for the injection of custom logic and animation effects. It supports advanced visual methods including DOM content morphing, parallel-DOM rendering for overlapping animations, and integration with the native browser View Transitions API.

The library covers a broad range of capabilities, including client-side navigation management, memory-based page caching, and background page preloading to optimize performance. It also provides comprehensive scroll position restoration, accessibility optimizations for screen readers, and tools for synchronizing document head metadata and script execution across transitions.

Features

  • Single-Page Navigators - Provides a system to intercept navigation and replace content to simulate a single-page application experience.
  • Page Transition Animations - Swaps page content using CSS transitions or JavaScript animations to create a seamless navigation experience.
  • AJAX Content Swapping - Intercepts navigation to replace DOM containers via asynchronous requests to simulate a single-page application experience.
  • Partial Page Swapping - Swaps specific DOM containers with new content during navigation to avoid reloading the entire page.
  • Transition Lifecycle Hooks - Executes a sequence of asynchronous hooks and plugins at defined stages of the page transition lifecycle.
  • Plugin-Based Extensibility - Implements an architectural pattern that allows adding specialized behaviors and animation effects via custom plugins.
  • History API Navigators - Uses the browser's History API to track and retrieve navigation data, including redirects, during page swaps.
  • Page Transition Libraries - Provides a comprehensive library for creating seamless animated transitions between pages on server-rendered websites.
  • AJAX Page Loaders - Fetches new page content via AJAX and updates the DOM without requiring a full browser reload.
  • Browser History Management - Synchronizes application state with the browser history API to maintain native navigation behavior.
  • History State Updaters - Synchronizes the browser URL and history stack to ensure native back and forward buttons trigger transitions.
  • Browser History Navigations - Provides programmatic control over how back and forward button events trigger page transitions and animations.
  • Page Transition Hooks - Provides a hook-based lifecycle system to execute custom asynchronous logic during page transitions.
  • Document Head Management - Synchronizes head tags, metadata, and stylesheets between pages to maintain consistent document state during transitions.
  • Document Head Synchronization - Synchronizes head tag contents and HTML attributes between transitions to keep document metadata current.
  • DOM Content Orchestration - Swaps specific HTML containers and synchronizes document head metadata without performing a full page reload.
  • DOM Morphing - Updates the inner content of elements without replacing the node to preserve scroll position and state.
  • Page-Specific Script Execution - Executes custom initialization and cleanup scripts in the head or body after a page transition.
  • Client-Side Navigation Management - Programmatically manages view transitions and browser history to replace page content dynamically.
  • Server-Rendered Transition Enhancements - Creates seamless visual transitions between server-rendered pages to simulate a single-page application.
  • Programmatic Transition Functions - Executes custom animation functions for page transitions using route patterns or attributes instead of CSS.
  • Web Page Output Caching - Stores previously fetched HTML content in memory to accelerate navigation and reduce redundant network requests.
  • Morphing Page Caches - Stores previously visited pages in memory to enable instant restoration and DOM morphing.
  • Just-in-Time Page Prefetches - Reduces perceived load time by prefetching page content in the background via hover or visibility triggers.
  • Transition Triggers - Tracks history entries to decide if a navigation should use an animated transition or a standard page reload.
  • Screen Reader Optimizations - Optimizes screen reader experience by managing focus and announcing page changes during dynamic content swaps.
  • Cross-Page Element Persistence - Transfers specific DOM elements and event listeners from one page to the next to maintain state.
  • Animation Completion Coordination - Ensures page content updates only after outgoing and incoming animations have fully completed.
  • Page Transition Styling - Assigns specific animation styles to links or containers to change the visual transition between pages.
  • Parallel DOM Rendering - Retains previous page content in the DOM to run incoming and outgoing animations simultaneously.
  • Perceived Performance Optimizations - Reduces perceived load times through techniques like background preloading of linked pages and memory caching.
  • Predefined Animation Effects - Provides a collection of pre-configured animation plugins to implement polished page transitions without manual styling.
  • Navigation Scroll Resets - Resets scroll position after navigation while supporting anchor links to maintain standard browser behavior.
  • Scroll Behavior Control - Implements advanced control over how the window scrolls during page transitions, including smooth animations.
  • Scroll Restoration - Tracks and restores the vertical scroll position and anchor focus when navigating between pages.
  • Scroll Position Maintenance - Manages and maintains the scroll offset during transitions and anchor jumps for a consistent user experience.
  • View Transitions - Integrates with the native browser View Transitions API to create smooth screen navigation effects.
  • History Entry Replacements - Controls whether a page transition creates a new history entry or replaces the current one.
  • Dynamic Fragment Updates - Replaces specific DOM elements instead of the entire page based on the route to maintain state.
  • DOM Content Morphing - Updates the content of specific elements without replacing the DOM node to preserve container scroll positions.
  • Parallel Container Rendering - Maintains both the outgoing and incoming page containers in the DOM simultaneously to enable overlapping animations.
  • Event Delegation - Attaches global listeners to the document to intercept link clicks and trigger dynamic page transitions.
  • Transition-Aware Submissions - Serializes and submits forms while maintaining animated page transitions for a seamless experience.
  • Navigation State Tracking - Tracks navigation metadata, including source and destination URLs, to ensure consistent browser history behavior.
  • Transition Exclusions - Allows preventing specific links or containers from triggering the page load lifecycle using custom attributes.
  • Transition Link Filtering - Allows defining which elements trigger page transitions and excluding specific URLs from the dynamic loading logic.
  • Programmatic Navigation - Provides APIs to programmatically trigger page transitions with custom animations and caching options.
  • Client-Side URL Rewriters - Transforms URLs on the client side before fetching to map paths to specific resources or prevent reloads.
  • Animation Libraries - Flexible page transition library for web projects.

Star history

Star history chart for swup/swupStar history chart for swup/swup

How this analysis was created: This summary and feature list were written by an AI model that read the project's README and public documentation pages. Each feature links to the documentation it came from; stars, license and language come straight from the GitHub API. The model does not read the source code, and the analysis is refreshed when the project is re-analysed. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does swup/swup do?

Swup is a page transition library and AJAX page loader designed to create seamless, animated transitions between pages on server-rendered websites. It functions as a DOM content orchestrator and browser history manager, intercepting navigation to replace page content dynamically and simulate a single-page application experience.

What are the main features of swup/swup?

The main features of swup/swup are: Single-Page Navigators, Page Transition Animations, AJAX Content Swapping, Partial Page Swapping, Transition Lifecycle Hooks, Plugin-Based Extensibility, History API Navigators, Page Transition Libraries.

What are some open-source alternatives to swup/swup?

Open-source alternatives to swup/swup include: miguel-perez/smoothstate.js — smoothState.js is an AJAX navigation manager and jQuery page transition library designed to create seamless… barbajs/barba — Barba is a JavaScript page transition library that intercepts browser navigation to swap page content and animate… vuejs/router — Vue.js Client-Side Router is a routing library for Vue.js that synchronizes the browser URL with application state to… vuejs/vue-router — Vue.js Client-Side Router is a routing library that maps browser URLs to Vue.js components to enable the creation of… hotwired/turbo — Hotwire Turbo is a server-driven navigation and HTML streaming framework that intercepts link clicks and form… inertiajs/inertia — Inertia is a server-driven frontend framework designed to create monolithic single page applications. It acts as a…

Open-source alternatives to Swup

Similar open-source projects, ranked by how many features they share with Swup.
  • miguel-perez/smoothstate.jsmiguel-perez avatar

    miguel-perez/smoothState.js

    4,377View on GitHub↗

    smoothState.js is an AJAX navigation manager and jQuery page transition library designed to create seamless transitions between pages by loading remote content asynchronously. It functions as a browser history state manager that attaches custom serializable data to history entries and handles URL redirects without requiring full browser refreshes. The library includes a client-side page cache that stores previously visited pages in memory for instant reloading. It further reduces perceived load times through a content prefetching system that initiates network requests when a user hovers over

    CSS
    View on GitHub↗4,377
  • barbajs/barbabarbajs avatar

    barbajs/barba

    12,940View on GitHub↗

    Barba is a JavaScript page transition library that intercepts browser navigation to swap page content and animate transitions without a full page refresh. It functions as an AJAX page loader and client-side navigation manager, coordinating the lifecycle of transitions through hooks and custom logic during view changes. The library distinguishes itself as a frontend animation orchestrator that triggers specific visual effects and scripts based on the source and destination of a website page. It employs a rules-based system to resolve which specific animation or transition to execute by matchin

    TypeScript
    View on GitHub↗12,940
  • vuejs/routervuejs avatar

    vuejs/router

    4,638View on GitHub↗

    Vue.js Client-Side Router is a routing library for Vue.js that synchronizes the browser URL with application state to enable single-page application navigation. It functions as a URL-to-component mapper, rendering specific components based on the current URL path and dynamic route patterns. The project serves as a browser history manager that controls how internal routes map to the browser URL using various history strategies. It also provides a navigation guard framework to execute logic and access control during route transitions. The library covers dynamic route management, programmatic U

    TypeScriptvuevue-router
    View on GitHub↗4,638
  • vuejs/vue-routervuejs avatar

    vuejs/vue-router

    18,898View on GitHub↗

    Vue.js Client-Side Router is a routing library that maps browser URLs to Vue.js components to enable the creation of single-page applications. It functions as a navigation engine that manages browser history and URL state to allow page transitions without full browser reloads. The system utilizes a nested route manager to render hierarchical views that match complex URL structures. It includes navigation guard middleware to intercept, validate, or redirect route transitions before components are rendered. A client-side history handler synchronizes application state with the browser URL using

    JavaScript
    View on GitHub↗18,898
See all 30 alternatives to Swup→