This documentation is for v9.0.0-rc01. If you're looking for the latest stable release, see the v8 documentation.

Wheel Gestures

This plugin does not currently support v9. For updates, please refer to the repository or follow the open issue tracking v9 support.

View plugin on GitHub

This plugin adds mouse and trackpad wheel support to Embla Carousel, allowing users to navigate slides using scroll gestures.


Installation

First you need to install the npm package and save it to your dependencies:

npm install embla-carousel-wheel-gestures --save

Options

Below follows an exhaustive list of all Wheel Gestures options and their default values.


wheelDraggingClass

{ wheelDraggingClass: 'is-wheel-dragging' }

Choose a classname that will be applied to the container during a wheel gesture. Pass an empty string to opt-out.


forceWheelAxis

{ forceWheelAxis: 'x' | 'y' }

Force an axis on which to listen for wheel events. Choose scroll axis between x and y. Useful if you want to slide horizontally when scrolling vertically or vice versa.


target

{ target: document.querySelector('.embla__viewport') }

Specify the element that should be observed for wheel events.


Edit this page on GitHub