Last active
          September 26, 2019 08:24 
        
      - 
      
- 
        Save marekalgoud/c4ca9053abf3590a6c2280975a79ddf2 to your computer and use it in GitHub Desktop. 
    Barba.js init
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import barba from '@barba/core' | |
| import animin from './anims/in' | |
| import animout from './anims/out' | |
| barba.init({ | |
| transitions: [ | |
| { | |
| leave: ({ current }) => { | |
| // launch your leave animation here on the current container | |
| return animout(current.container) | |
| }, | |
| enter: ({ next }) => { | |
| // launch your enter animation here on the next container | |
| return animin(next.container) | |
| }, | |
| } | |
| ] | |
| }) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment