You are browsing the docs for swup 3.
Click here for the latest version.

swup v3 swup v3 Fade Theme
GitHub swup on GitHub

Fade Theme

Basic theme for fade in/out animation of the main container.

Installation

This theme can be installed with npm

npm install @swup/fade-theme

and included with import

import SwupFadeTheme from '@swup/fade-theme';

or included from the dist folder

<script src="./dist/SwupFadeTheme.js"></script>

Usage

To run this theme, include an instance in the swup options.

const swup = new Swup({
  plugins: [new SwupFadeTheme()]
});

mainElement Option

Changes the selector of the elements to fade in/out. Defaults to #swup.