Barba is a small (7kb minified and compressed) and easy-to-use 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.
This is beta version, use it at your own risks! π±
Thanks in advance for reporting bugs. #sharethelove πLooking for v1? π
- Simplified API
- Hook sytem for
transitions
andviews
- 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/transition
: ready-to-use basic transitions pack (fade, slide, β¦) (coming soon)
- Barba container and wrapper now use
data-barba
attribute - Same for namespace via
data-barba-namespace
- 2 main methods:
barba.init()
andbarba.use()
(for plugins) - 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
- hooks can be synchronous or asynchronous (via
- use "rules" to select which transition to use
- default rules are
namespace
andcustom
@barba/router
addsroute
rule- they can be combined within
from
andto
properties
- default rules are
- Views:
- are plain JS objects
- are declared via the
barba.init({ views })
- use a subset of animation "hooks":
beforeAppear
,afterAppear
,beforeLeave
,afterLeave
,beforeEnter
,afterEnter
- receive the same
data
argument
- Sync mode will start
leave
andenter
transitions concurrently
If you want to report a bug or if you just want to request for a new feature/improvement, please follow those instructions before.
Thanks for taking time to contribute to Barba π π
Luigi De Rosa
π€ π» π π¬ πβ οΈ π π
Thierry Michel
π€ π» π π¬ πβ οΈ π π
Xavier Foucrier
π€ π π¬β οΈ π
Marco Grimaldi
π¨
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
π¬
Deleted user
π¬
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
π
- CI setup (PR, publish, β¦)
- Write manual documentation
- Generate code documentation
- Testing, debugging, fixing, testingβ¦
- e2e testing suite
- New website