LookForward.js

LookForward.js is a small library that helps you to create smooth transitions between pages with the easiest way

Demo

Please click the cards below.

Installation

via npm

$ npm install lookforward --save

or yarn

$ yarn add lookforward

CDN

<link rel="stylesheet" href="https://unpkg.com/lookforward@0.1.1/css/lookforward.min.css">
<script src="https://unpkg.com/lookforward@0.1.1/js/lookforward.min.js"></script>

Usage

JavaScript

// import Lookforward from 'lookforward';
new LookForward('.js-lookforward');

HTML

<a href="./a.html" class="js-lookforward" data-transition-enter="slideup" data-transition-leave="slidedown">Label</a>

If you want to close the current page, you should put elements whose class name is 'js-lookforward-close-btn'

<button class="js-lookforward-close-btn" >Back</button>