To enable swipe functionality between tab panes on mobile in Webflow, you need to use custom JavaScript code with a touch event listener or a library like Hammer.js.
w-tab-content) a unique class, like mobile-tabs.
https://cdn.jsdelivr.net/npm/hammerjs@2.0.8/hammer.min.js
For Hammer.js:
<script>
const tabContent = document.querySelector('.mobile-tabs');
const tabs = document.querySelectorAll('.w-tab-link');
let currentTab = 0;
const hammer = new Hammer(tabContent);
hammer.on('swipeleft', () => {
if (currentTab < tabs.length - 1) {
currentTab++;
tabs[currentTab].click();
}
});
hammer.on('swiperight', () => {
if (currentTab > 0) {
currentTab--;
tabs[currentTab].click();
}
});
// Update index on tab click
tabs.forEach((tab, index) => {
tab.addEventListener('click', () => {
currentTab = index;
});
});
</script>
If Not Using Hammer.js
You'll need to write basic touch events (touchstart, touchend) and calculate swipe direction manually, which is more complex and error-prone on multiple devices.
To create mobile swipe navigation between Webflow tabs, assign a class to your tab content wrapper, load Hammer.js, then use JavaScript to detect swipe gestures and simulate click events on tab links. This approach gives a smooth user interaction and is fully compatible with Webflow’s native Tabs component.