Skip to content

Instantly share code, notes, and snippets.

@marekalgoud
Created September 26, 2019 09:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save marekalgoud/96dd86aa459fc5b647e13d05b809cf2d to your computer and use it in GitHub Desktop.
Save marekalgoud/96dd86aa459fc5b647e13d05b809cf2d to your computer and use it in GitHub Desktop.
barba transition hooks
beforeLeave: ({ current }) => {
barba.wrapper.style.height = current.container.offsetHeight + 'px'
},
beforeEnter: ({ current, next }) => {
barba.wrapper.style.height = next.container.offsetHeight + 'px'
current.container.style.zIndex = -1
next.container.style.zIndex = 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment