transito

0.3.7 • Public • Published

Transito

Page transitions made easy

Installation

$ npm install transito

Basic example

import Transito from 'transito';

let transito = new Transito('https://www.yourdomain.com', 'body', 'a');

transito.on('progress', e => {
  console.log(e);
});

transito.on('postload', e => {
  console.log(e);
});

transito.on('preload', e => {
  console.log(e);
});

Basic example with options

new Transito('https://www.yourdomain.com', '#wrapper', 'a', {
  preload: false, // disables preloading on mouseover (default = true)
  cache: false, // disables caching of responses (default = true)
  minDuration: 2000, // sets minimum transition duration to 2 seconds (default = 800)
  classLoading: 'transitioning' // sets the class to be set on the body to "transitioning" (default = "loading")
});

Readme

Keywords

none

Package Sidebar

Install

npm i transito

Weekly Downloads

1

Version

0.3.7

License

none

Unpacked Size

14.9 kB

Total Files

3

Last publish

Collaborators

  • rein