Programming language: TypeScript
License: MIT License
Tags: Animations    

barbajs alternatives and similar libraries

Based on the "Animations" category.
Alternatively, view barba alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of barbajs or a related project?

Add another 'Animations' Library


barba.js [v2]

Stability CircleCI Coverage Status Commitizen friendly Conventional Commits lerna License All Contributors Slack channel

Invite link to slack channel

Barba.js is a small (7kb minified and compressed) and easy-to-use library that helps you create fluid and smooth transitions between your website's pages.

It helps reduce the delay between your pages, minimize browser HTTP requests and enhance your user's web experience.


What's new?

  • Simplified API
  • Hook system for transitions and views
  • Transition resolution: declare your transitions and let Barba pick the right one
  • Use of data-barba attributes
  • Sync mode
  • Plugin system
    • @barba/router: use of routes for transition resolution
    • @barba/css: automatic addition of CSS classes
    • @barba/prefetch: automatic pages prefetching (and caching), based on viewport
    • @barba/head: update your <head> (coming soon)
    • @barba/preset: ready-to-use basic transitions pack (fade, slide, …) (coming soon)

Main changes (TL;DR)

  • Barba now use data-barba-* attributes:
  • 2 main methods:
    • barba.init() for transitions, views and Barba core settings
    • barba.use() for plugins (router, css, prefetch, etc.)
  • Transitions:
    • are plain JS objects
    • are declared via the barba.init({ transitions })
    • use "hooks" corresponding to animation steps
    • hooks can be synchronous or asynchronous (via this.async() or Promise based)
    • all hooks receive same data argument
    • use "rules" to select which transition to use
    • default rules are namespace and custom
    • @barba/router adds route rule
    • they can be combined within from and to properties
  • Views:
    • are plain JS objects
    • are declared via the barba.init({ views })
    • use a subset of animation "hooks":
    • beforeOnce, afterOnce, beforeLeave, afterLeave, beforeEnter, afterEnter
    • receive the same data argument
  • Sync mode will start leave and enter transitions concurrently

How to contribute

If you want to report a bug or if you just want to request for a new feature/improvement, please follow [those instructions](.github/CONTRIBUTING.md) before.

Thanks for taking time to contribute to Barba :tada: :+1:


<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore --> Luigi De Rosa🤔 💻 📖 💬 🐛 ⚠️ 👀 🚇Thierry Michel🤔 💻 📖 💬 🐛 ⚠️ 👀 🚇Xavier Foucrier🤔 💻 📖 💬 ⚠️ 👀 🐛Marco Grimaldi🎨Petr TIchy📝 ✅ 📹Cody Marcoux💬Phil.💬Giorgio Finulli💬Wouter🐛 💬Mike Wagz🤔 💬 ⚠️Red Stapler✅ 📹Jérémy Levron💬Nguyen Van Anh💻Daniel Weber💻Jean-Marie Porchet💻James💻Nicholas💻Patrick Arminio💻A (from Sicily)💻Pavel Mazhuga💬Daniele De Matteo💬aswinkumar863💬BounceIncHQ💬gordonwes💬Evan Fleet💬 🐛Jörg💡ZAAK💡 💬Masahiro Tonomura💡CassiusHR💬Shane Murphy💬Dylan Reeves💬 💡Quentin Neyraud💬tortilaman💬psntr💬Kevin Clark💬Tadeas Kosek💬Gustavo de Andrade💬Clinton💬Dave Stockley💬khaiknievel💬 🐛Francesco Michelini💬 💡Domantas Petrauskas💬Kyle Brumm💬Oliver Belmont💬Lu Nelson💬Bram Cordie💬 🤔Michael Schouman💬Pascal Garber💬 🤔Federico Brigante💬Corey Lee💬Milan Simonovic💬Julien Vasseur💬Maciej Wrona💬Terion🤔Matt Seccafien🤔Max Schulmeister🤔David🤔Pierre-Henri Lavigne🤔lsbyerley🤔Guillaume M.🤔Oscar Otero🤔Nico Prat🤔Marco Solazzi🐛atoupet-toki🐛Josias🐛Oksana Romaniv🐛Olivier Guilleux🐛Liroo Pierre ᵈᵉᵛ💻Luis Martins🐛Matthew🤔 💬Simon Goetz🐛Luís Carvalho💬Samuel Berisha💬


Next steps

  • [x] CI setup (PR, publish, …)
  • [x] Write manual documentation
  • [x] Generate code documentation
  • [x] New website
  • [ ] More Testing, debugging, fixing, testing…

*Note that all licence references and agreements mentioned in the barbajs README section above are relevant to that project's source code only.