Hammer.js
JavaScript library that recognizes touch, mouse and pointer gestures on elements of a web page.
hammerjs.github.io/repositorydocs
Hammer.js attaches gesture recognition to an element on a web page. A page creates a Hammer instance for an element and listens for named events. Press, tap, double tap, horizontal pan and swipe are recognized by default. Pinch and rotate are off by default because they would make the element blocking, and an instance can switch them on. Developers who need their own gestures, such as a triple tap, create a manager, add recognizers to it and subscribe to the event names they define. The getting-started guide covers both setups. Hammer recognizes gestures made with touch, mouse and pointer events.
Worth knowing
The getting-started guide states that the library is in low maintenance mode and that volunteers develop it.
Identity
Rendering and deploy
- Install with
- npm6
Releases
Adoption
Sources
- 2026-11-09: links
hammerjs.github.io/ - 2026-11-09: links, Written in, License
github.com/hammerjs/hammer.js - 2026-11-09: links, Maintained by, Categories
hammerjs.github.io/getting-started/ - 2026-11-09: Maintainer, License model
github.com/hammerjs/hammer.js/blob/master/LICENSE.md - 2026-11-09: First release, Current major version, Last release
registry.npmjs.org/hammerjs - 2026-11-09: Install with
github.com/hammerjs/hammer.js/blob/master/README.md - 2026-11-09: GitHub stars
api.github.com/repos/hammerjs/hammer.js - 2026-11-09: Contributors
api.github.com/repos/hammerjs/hammer.js/contributors?per_page=1 - 2026-11-09: npm downloads a week
api.npmjs.org/downloads/range/2026-11-01:2026-11-07/hammerjs - 2026-11-09: Dependent packages, Dependent repositories
packages.ecosyste.ms/api/v1/registries/npmjs.org/packages/hammerjs