# alexgibson/shake.js

A custom 'shake' event plugin for mobile web browsers using device accelerometer.

Repository: https://github.com/alexgibson/shake.js
Canonical: https://ross.abutalabs.com/products/shakejs
Homepage: https://alexgibson.github.io/shake.js/
Language: JavaScript
License: NOASSERTION
License Family: other
Archived: true
Last push: 2018-10-17T09:29:49+00:00

## Health v2 (maintenance only)
Score: 10/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5761, "days_push": 2877, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, archived, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1507, forks 275 (observed 2026-08-28T04:04:55.200125+00:00)

## What it is
A small JavaScript plugin that adds a custom 'shake' event to mobile web browsers using the device accelerometer via the devicemotion API. It lets web apps trigger actions (like shake-to-undo) when the user physically shakes their phone or tablet.

## Use cases
- detect shake gesture in mobile web app
- implement shake to undo on iphone/ipad web app
- trigger action when user shakes phone in browser
- listen to device accelerometer shake events in javascript
- add shake event listener to mobile website

## When to choose
- you need shake gesture detection in a mobile web browser without native code
- you want a tiny dependency-free library using the W3C devicemotion API
- you need broad legacy mobile browser support including older iOS and Android

## When to avoid
- your app runs only on desktop browsers without devicemotion support
- you need native app shake detection rather than web
- you need a maintained solution - the project has not been updated since 2018 and modern mobile browsers restrict devicemotion to HTTPS with user permission

## Facets
- artifact type: plugin
- maturity: maintenance
- function: plugin-system, middleware
- domain: web-development, mobile-development, frontend
- platform: browser
- tags: shake-gesture, devicemotion, accelerometer, mobile-web, event-plugin, mobile, javascript, ios, android

## Member repositories
- alexgibson/shake.js (main) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:55.200125+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:32:35.928309+00:00, confidence not recorded.
  - readme: https://github.com/alexgibson/shake.js (fetched 2026-08-28T04:04:55.200125+00:00, sha ccf064c246f3)
  - homepage: https://alexgibson.github.io/shake.js/ (fetched 2026-08-29T11:37:07.997469+00:00, sha 532063dfd73b)
  - registry_npm: https://registry.npmjs.org/shake.js (fetched 2026-08-29T11:37:07.999924+00:00, sha 65af7c5e05bf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
