{"id":17768098,"url":"https://github.com/quisido/use-mouse-move","last_synced_at":"2026-01-12T02:16:04.979Z","repository":{"id":66324011,"uuid":"304554431","full_name":"quisido/use-mouse-move","owner":"quisido","description":"React hook for listening to mouse move events","archived":false,"fork":false,"pushed_at":"2021-04-27T21:21:27.000Z","size":46535,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-20T04:43:11.678Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/quisido.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-10-16T07:37:52.000Z","updated_at":"2024-03-10T00:46:26.000Z","dependencies_parsed_at":"2023-11-29T08:23:54.450Z","dependency_job_id":"faffd6d9-4cf2-40d9-8995-2bce60236705","html_url":"https://github.com/quisido/use-mouse-move","commit_stats":null,"previous_names":["quisido/use-mouse-move","charlesstover/use-mouse-move"],"tags_count":0,"template":false,"template_full_name":"CharlesStover/node-package-template","purl":"pkg:github/quisido/use-mouse-move","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quisido%2Fuse-mouse-move","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quisido%2Fuse-mouse-move/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quisido%2Fuse-mouse-move/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quisido%2Fuse-mouse-move/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/quisido","download_url":"https://codeload.github.com/quisido/use-mouse-move/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/quisido%2Fuse-mouse-move/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28331852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T00:36:25.062Z","status":"online","status_checked_at":"2026-01-12T02:00:08.677Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-26T20:55:43.306Z","updated_at":"2026-01-12T02:16:04.964Z","avatar_url":"https://github.com/quisido.png","language":"TypeScript","funding_links":["https://github.com/sponsors/CharlesStover"],"categories":[],"sub_categories":[],"readme":"# useMouseMove [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Listen%20to%20mouse%20move%20events%20with%20a%20React%20hook.\u0026url=https://github.com/CharlesStover/use-mouse-move\u0026via=CharlesStover\u0026hashtags=react,reactjs,javascript,typescript,webdev,webdevelopment) [![version](https://img.shields.io/npm/v/use-mouse-move.svg)](https://www.npmjs.com/package/use-mouse-move) [![minzipped size](https://img.shields.io/bundlephobia/minzip/use-mouse-move.svg)](https://www.npmjs.com/package/use-mouse-move) [![downloads](https://img.shields.io/npm/dt/use-mouse-move.svg)](https://www.npmjs.com/package/use-mouse-move) [![build](https://api.travis-ci.com/CharlesStover/use-mouse-move.svg)](https://travis-ci.com/CharlesStover/use-mouse-move/)\n\nListen to mouse move events with a React hook.\n\n- [Install](#install)\n- [Use](#use)\n  - [Variants](#variants)\n- [Sponsor](#sponsor)\n\n## Install\n\n- `npm install use-mouse-move` or\n- `yarn add use-mouse-move`\n\n## Use\n\n```javascript\nimport useMouseMove from 'use-mouse-move';\n\nfunction App() {\n  const [x, y] = useMouseMove();\n  return (\n    \u003cp\u003e\n      Your mouse coordinates are {x}, {y}.\n    \u003c/p\u003e\n  );\n}\n```\n\n### Variants\n\nThe `useMouseMove` hook accepts one parameter -- a `MouseMoveVariant` enum that\nyou can import from the `use-mouse-move` package. These variants coincide with\nthe different x/y coordinates emit by mouse move events.\n\n```javascript\nimport useMouseMove, { MouseMoveVariant } from 'use-mouse-move';\nuseMouseMove(MouseMoveVariant.Default);\n```\n\n- `MouseMoveVariant.Default`: `x` and `y` (default if no variant is specified)\n- `MouseMoveVariant.Client`: `clientX` and `clientY`\n- `MouseMoveVariant.Movement`: `movementX` and `movementY` (relative movement)\n- `MouseMoveVariant.Offset`: `offsetX` and `offsetY`\n- `MouseMoveVariant.Page`: `pageX` and `pageY`\n- `MouseMoveVariant.Screen`: `screenX` and `screenY`\n\n## Sponsor 💗\n\nIf you are a fan of this project, you may\n[become a sponsor](https://github.com/sponsors/CharlesStover)\nvia GitHub's Sponsors Program.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquisido%2Fuse-mouse-move","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquisido%2Fuse-mouse-move","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquisido%2Fuse-mouse-move/lists"}