Skip to content

Create badass, fluid and smooth transition between your website's pages.

License

Notifications You must be signed in to change notification settings

nodeonly/barba.js

Repository files navigation


barba.js is a small (4.4kb minified and gzipped), flexible and dependency free library that helps you creating fluid and smooth transitions between your website's pages.

It helps reducing the delay between your pages, minimizing browser HTTP requests and enhancing your user's web experience.


Websites using Barba.js

View demos

Features

Installation

barba.js supports AMD, CommonJS and Browser global (using UMD).
You can install it using npm:

npm install barba.js --save-dev 

or just including the script in your page:

<scriptsrc="barba.min.js" type="text/javascript"></script>

barba.js needs to know a little bit about your DOM structure. By default uses this markup structure in your pages:

<divid="barba-wrapper"><divclass="barba-container"> ...Put here the content you wish to change between pages... </div></div>

Please note, all the selector (#barba-wrapper, .barba-container) are easily editable, see the API section.

After you've included barba.js in your project it's time to initialize it

// Please note, the DOM should be readyBarba.Pjax.start();

Contribute

Barba.js is created in the spare time by Luigi De Rosa and released under MIT licence.
Any help on the project is more than welcomed.
For any problem/question do not hesitate to open an issue.

Other

For any other information, please visit the website

About

Create badass, fluid and smooth transition between your website's pages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript100.0%