Webflow.require('ix2').init();. barba.hooks.after() or the afterEnter() method of a view to ensure Webflow binds interactions to the new DOM.When using third-party page transition libraries like Barba.js v2, Webflow Interactions may stop working because Webflow binds its interactions only on the initial page load. You need to manually reinitialize Webflow Interactions after each Barba.js page transition.
DOMContentLoaded or window.load.
barba.hooks.afterEnter or barba.hooks.after hook in your Barba.js setup:
Webflow.require('ix2').init();
Webflow.ready();
Place this inside your Barba initialization:
barba.init({
transitions: [{
name: 'fade-transition',
leave(data) {
return gsap.to(data.current.container, {opacity: 0});
},
enter(data) {
return gsap.from(data.next.container, {opacity: 0});
}
}],
views: [{
namespace: 'your-namespace',
afterEnter() {
Webflow.require('ix2').init();
}
}]
});
'your-namespace' with the actual data-barba-namespace of your page.barba.hooks.after(() => Webflow.require('ix2').init()); to apply it globally.
Webflow.require('ix2').init();.
To make Webflow Interactions work with Barba.js v2, you must manually reinitialize IX2 by calling Webflow.require('ix2').init(); after each page transition completes. Use it inside barba.hooks.after() or afterEnter() in a view. This will ensure your animations and interactions are re-bound to the new DOM elements.