{"id":25426866,"url":"https://github.com/aaronkirkham/vue-gamepad","last_synced_at":"2025-09-05T18:33:47.440Z","repository":{"id":33114634,"uuid":"130113294","full_name":"aaronkirkham/vue-gamepad","owner":"aaronkirkham","description":"🎮 A Vue.js plugin to add gamepad support. Bind any element to trigger a callback when a gamepad button is pressed.","archived":false,"fork":false,"pushed_at":"2023-01-06T01:36:16.000Z","size":850,"stargazers_count":18,"open_issues_count":16,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-06T22:44:17.374Z","etag":null,"topics":["gamepad","javascript","vue"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/aaronkirkham.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}},"created_at":"2018-04-18T19:40:33.000Z","updated_at":"2023-05-25T05:14:36.000Z","dependencies_parsed_at":"2023-01-14T23:25:09.991Z","dependency_job_id":null,"html_url":"https://github.com/aaronkirkham/vue-gamepad","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronkirkham%2Fvue-gamepad","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronkirkham%2Fvue-gamepad/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronkirkham%2Fvue-gamepad/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronkirkham%2Fvue-gamepad/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronkirkham","download_url":"https://codeload.github.com/aaronkirkham/vue-gamepad/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239217109,"owners_count":19601593,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["gamepad","javascript","vue"],"created_at":"2025-02-17T00:40:00.653Z","updated_at":"2025-02-17T00:40:01.276Z","avatar_url":"https://github.com/aaronkirkham.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg width=\"128px\" src=\"./assets/logo.svg\" alt=\"Vue Gamepad logo\"\u003e\u003c/p\u003e\n\u003ch1 align=\"center\"\u003evue-gamepad\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/travis/com/aaronkirkham/vue-gamepad.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/size/aaronkirkham/vue-gamepad/dist/vue-gamepad.min.js.svg\" /\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/aaronkirkham/vue-gamepad.svg\" /\u003e\n\u003c/p\u003e\n\nA Vue.js plugin to add gamepad support. Bind any element to trigger a callback when a gamepad button is pressed.\n\n## Installation\n#### npm/yarn\n```bash\n$ npm install vue-gamepad\n# or with yarn\n$ yarn add vue-gamepad\n```\n\n#### CDN\nhttps://unpkg.com/vue-gamepad/dist/vue-gamepad.min.js\n\n## Usage\nTell Vue to use the plugin\n```js\nimport Vue from 'vue';\nimport VueGamepad from 'vue-gamepad';\n\nVue.use(VueGamepad);\n```\n\nExample usage inside templates:\n```html\n\u003cbutton v-gamepad:button-a=\"callback\"\u003ePress me!\u003c/button\u003e\n```\n\n## Constructor Options\n|Key|Description|Default|Type|\n|:---|---|---|---|\n|`analogThreshold`|Threshold before analog events are triggered. Low values may cause false positives|`0.5`|`Number`|\n|`buttonMapping`|List of strings containing button indices|[Mapping](lib/button-mapping.js#L1)|`Array`|\n|`buttonInitialTimeout`|Time (in milliseconds) until the button will start repeating when held down|`200`|`Number`|\n|`buttonRepeatTimeout`|Time (in milliseconds) between each button repeat event when held down|`200`|`Number`|\n|`injectClasses`|Add classes to elements which have a gamepad binding|`true`|`Boolean`|\n\n## Directives\n- `v-gamepad` - Bind an element to a gamepad action which will fire a callback\n  - `released` modifier - Only fire the callback when the button is released\n  - `repeat` modifier - Repeatedly fire the callback when the button is held\n- ~~`v-gamepad-layer` - TODO~~\n- ~~`v-gamepad-json` - Pass a raw object of buttons, actions and callbacks to bind~~\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronkirkham%2Fvue-gamepad","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronkirkham%2Fvue-gamepad","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronkirkham%2Fvue-gamepad/lists"}