Theme for slide in/out animation. Makes content slide out (+fade) in one direction, and slide in from the other.
This theme can be installed with npm
npm install @swup/slide-theme
and included with import
import SwupSlideTheme from '@swup/slide-theme';
or included from the dist folder
<script src="./dist/SwupSlideTheme.js"></script>
To run this theme, include an instance in the swup options.
const swup = new Swup({
theme: [new SwupSlideTheme()]
});
Changes the selector of the elements to slide in/out.
Defaults to #swup
.
Makes the direction reversed.
Defaults to false
.