# swup/swup

Versatile and extensible page transition library for server-rendered websites 🎉

Repository: https://github.com/swup/swup
Canonical: https://ross.abutalabs.com/products/swup
Homepage: https://swup.js.org
Language: TypeScript
License: MIT
License Family: permissive
Topics: page-transitions, animation, javascript, router, transition, view-transitions
Last push: 2026-08-14T08:16:06+00:00

## Health v2 (maintenance only)
Score: 90/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 97, release rhythm 76, longevity 100
- inputs: {"age_days": 3250, "days_push": 19, "days_rel": 82, "gap_med": 52.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5220, forks 199 (observed 2026-08-28T04:09:13.219335+00:00)

## What it is
Swup is a versatile and extensible page transition library for server-rendered websites, written in TypeScript. It intercepts link clicks, loads pages in the background, and smoothly animates between old and new content while managing caching, preloading, browser history, scroll position, and accessibility.

## Use cases
- add smooth page transitions to a server-rendered website
- make a multi-page site feel like a single-page app
- animate between pages using CSS transitions or the View Transitions API
- cache and preload pages to speed up navigation
- preserve browser history and scroll position during animated navigation
- replace only content containers instead of full page reloads
- animate form submissions or build infinite scroll with transitions

## When to choose
- you have a server-rendered (MPA) site and want SPA-like transitions without a full framework
- you want minimal markup and automatic CSS animation timing detection
- you need a small, modular core with a rich plugin and theme ecosystem
- you want native browser history, caching, and preloading out of the box

## When to avoid
- you are building a full SPA with React, Vue, or similar — their built-in routers handle transitions
- you need server-side rendering or client-side state management rather than page-to-page transitions
- your site relies heavily on full-page scripts that re-execute on every load without adaptation

## Facets
- artifact type: library
- maturity: stable
- function: animation, routing, caching, plugin-system, middleware
- domain: web-development, frontend, web-design
- platform: browser
- tags: page-transitions, view-transitions, server-rendered, spa-feel, typescript, progressive-enhancement, nodejs, web-server

## Member repositories
- swup/swup (main) score 90

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:13.219335+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:00:09.293139+00:00, confidence not recorded.
  - readme: https://github.com/swup/swup (fetched 2026-08-28T04:09:13.219335+00:00, sha 187d8704a11d)
  - homepage: https://swup.js.org (fetched 2026-08-29T08:55:26.618945+00:00, sha 921b243009a8)
  - site_page: https://swup.js.org/getting-started (fetched 2026-08-29T08:55:26.628262+00:00, sha ad9ae8be1688)
  - site_page: https://swup.js.org/getting-started/how-it-works (fetched 2026-08-29T08:55:26.630456+00:00, sha 8a45dbaf571c)
  - site_page: https://swup.js.org/getting-started/installation (fetched 2026-08-29T08:55:26.632291+00:00, sha 876c28045391)
  - site_page: https://swup.js.org/getting-started/example (fetched 2026-08-29T08:55:26.633951+00:00, sha b662358ff158)
  - site_page: https://swup.js.org/getting-started/animations (fetched 2026-08-29T08:55:26.636572+00:00, sha 2d86f4958705)
  - site_page: https://swup.js.org/getting-started/demos (fetched 2026-08-29T08:55:26.639458+00:00, sha 9336f90e8c0c)
  - site_page: https://swup.js.org/getting-started/showcase (fetched 2026-08-29T08:55:26.641433+00:00, sha e35fb67cb610)
  - site_page: https://swup.js.org/getting-started/videos (fetched 2026-08-29T08:55:26.643212+00:00, sha f33f5c66fc20)
- Data as of 2026-08-30T08:39:29.467469+00:00.
