In JavaScript, the wheel event fires when the user rotates a mouse wheel (or a trackpad / device that simulates a wheel). The event type is WheelEvent. It replaces the deprecated non-standard mousewheel event (MDN).
Register a listener with addEventListener. Check readiness and browser support before you rely on this event.
Opt out of passive. Cancelling needs { passive: false }.
Call preventDefault. Stops the browser from scrolling / zooming that gesture.
Adjust scale. Use deltaY to grow or shrink, then clamp the range.
Apply with JS. Set element.style.transform — no stylesheet required.
Compatibility
Browser Support
Elementwheel has Limited availability on MDN (not Baseline). Desktop browsers generally support it; Safari on iOS is a notable gap. It replaces the deprecated non-standard mousewheel event. Prefer scroll when you care about scroll position.
✓ Limited availability
Element wheel
Standard WheelEvent on desktop. Incomplete on some mobile browsers (notably iOS Safari).
DesktopLimited on iOS
Google ChromeSupported
Supported
Mozilla FirefoxSupported
Supported
Apple SafariDesktop yes · iOS gap
Partial
Microsoft EdgeSupported
Supported
OperaSupported
Supported
Internet Explorer9+ (legacy)
Partial
wheelLimited
Bottom line: Safe for desktop wheel / trackpad UX. Feature-detect or fall back to scroll / touch on mobile.
Frequently Asked Questions
It fires when the user rotates a wheel button on a pointing device (typically a mouse), or uses related inputs such as a trackpad that simulate wheel actions (MDN). The event type is WheelEvent.
No. MDN does not mark Element wheel as Deprecated, Experimental, or Non-standard. It has Limited availability (not Baseline), mainly because Safari on iOS does not support it. It replaces the deprecated non-standard mousewheel event.
A WheelEvent, which inherits from MouseEvent, UIEvent, and Event. Useful read-only properties include deltaX, deltaY, deltaZ, and deltaMode.
wheel means the user rotated a wheel or trackpad — it may or may not scroll. scroll means the scroll offset actually changed. Zoom gestures can fire wheel with ctrlKey true. Keyboard or scrollbar scrolling can fire scroll without wheel.
No. MDN warns that even when wheel triggers scrolling, delta* values do not necessarily match content scroll direction. Prefer watching scrollLeft / scrollTop on the scroll event.
When you only observe the wheel and do not call preventDefault(). Passive listeners let the browser scroll without waiting on your handler, which avoids jank. Use { passive: false } only when you must cancel the event (for example custom zoom).