Gathering detailed insights and metrics for wheel-gestures
Gathering detailed insights and metrics for wheel-gestures
Gathering detailed insights and metrics for wheel-gestures
Gathering detailed insights and metrics for wheel-gestures
embla-carousel-wheel-gestures
wheel gestures for embla carousel
react-use-gesture
React hook for receiving gestures https://use-gesture.netlify.app
@thi.ng/rstream-gestures
Unified mouse, mouse wheel & multi-touch event stream abstraction
react-scroll-wheel-handler
Simple react component for handling scroll trackpad, arrow keys, swipe gestures and mouse wheel event.
npm install wheel-gestures
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.4
Supply Chain
95.3
Quality
77.1
Maintenance
100
Vulnerability
100
License
TypeScript (97.28%)
JavaScript (2.72%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
37 Stars
616 Commits
4 Forks
3 Watchers
4 Branches
3 Contributors
Updated on Jun 17, 2025
Latest Version
2.2.48
Package Id
wheel-gestures@2.2.48
Unpacked Size
348.85 kB
Size
53.55 kB
File Count
76
NPM Version
8.19.4
Node Version
18.20.4
Published on
Aug 31, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
26
wheel gestures and momentum detection in the browser
Install wheel-gestures using your package manager:
1yarn add wheel-gestures # OR npm install wheel-gestures
Import and create an instance of WheelGestures and then add the element you want to observe.
1import { WheelGestures } from 'wheel-gestures' 2 3// create an instance per element 4const wheelGestures = WheelGestures() 5 6// find and observe the element the user can interact with 7const element = window.document.querySelector('.slider') 8wheelGestures.observe(element) 9 10// add your event callback 11wheelGestures.on('wheel', (wheelEventState) => { 12 //... 13})
There are options to customize the behaviour.
This is the TypeScript type of the WheelEventState object provided. Even if you do not use TypeScript, this might be helpful to see how the data is provided:
1export type VectorXYZ = [number, number, number] 2 3export interface WheelEventState { 4 isStart: boolean 5 isMomentum: boolean 6 isEnding: boolean 7 isMomentumCancel: boolean 8 axisDelta: VectorXYZ 9 axisVelocity: VectorXYZ 10 axisMovement: VectorXYZ 11 axisMovementProjection: VectorXYZ 12 event: WheelEvent | WheelEventData 13 previous?: WheelEventState 14}
Read more in the docs.
OS & Browsers
Other people also thought that it might be helpful for some interactions to be able to distinguish between user initiated wheel events and the ones that are triggered by inertia scroll, but none of the other known libraries delivered results in the precision I needed, so I developed my own solution. Honourable mentions:
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
SAST tool detected but not run on all commits
Details
Reason
Found 2/8 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
project is not fuzzed
Details
Reason
39 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More