Skip to content

lucavolino/overlay-theme

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swup Overlay Theme

Theme for slide in/out animation of overlay.

Instalation

This theme can be installed with npm

npm install @swup/overlay-theme

and included with import

import SwupOverlayTheme from '@swup/overlay-theme';

or included from the dist folder

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

Usage

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

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

Options

color

Changes color of the overlay element.
Defaults to #2D2E82.

duration

Changes the duration of the overlay animation.
Defaults to 600 (ms).

direction

Changes the direction of the overlay animation.
Defaults to to-right. Available values: to-right, to-left, to-bottom and to-top.

Default options

new SwupOverlayTheme({
    color: '#2D2E82',
    duration: 600,
    direction: 'to-right',
});

About

🎨 Simple, yet powerful, customisable swup theme with sliding overlay.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 53.4%
  • JavaScript 46.6%