{"id":15294931,"url":"https://github.com/ittus/vue-long-click","last_synced_at":"2025-08-02T11:34:06.735Z","repository":{"id":34141146,"uuid":"170462699","full_name":"ittus/vue-long-click","owner":"ittus","description":"Long click directive library for VueJS","archived":false,"fork":false,"pushed_at":"2023-01-03T22:56:16.000Z","size":3777,"stargazers_count":60,"open_issues_count":22,"forks_count":10,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-09T16:13:05.211Z","etag":null,"topics":["directive","longclick","longpress","vue-directive","vue-library","vuejs"],"latest_commit_sha":null,"homepage":"https://ittus.github.io/vue-long-click/","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/ittus.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-02-13T07:37:45.000Z","updated_at":"2024-12-29T10:09:13.000Z","dependencies_parsed_at":"2023-01-15T05:00:27.593Z","dependency_job_id":null,"html_url":"https://github.com/ittus/vue-long-click","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ittus/vue-long-click","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ittus%2Fvue-long-click","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ittus%2Fvue-long-click/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ittus%2Fvue-long-click/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ittus%2Fvue-long-click/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ittus","download_url":"https://codeload.github.com/ittus/vue-long-click/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ittus%2Fvue-long-click/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378966,"owners_count":24240907,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"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":["directive","longclick","longpress","vue-directive","vue-library","vuejs"],"created_at":"2024-09-30T17:08:02.018Z","updated_at":"2025-08-02T11:34:06.704Z","avatar_url":"https://github.com/ittus.png","language":"JavaScript","funding_links":[],"categories":["Components \u0026 Libraries","UI Components","UI Components [🔝](#readme)"],"sub_categories":["UI Components","Form"],"readme":"# vue-long-click\n\n\u003e Vue long click (longpress) directive\n\n[![npm version](https://badge.fury.io/js/vue-long-click.svg)](https://www.npmjs.com/package/vue-long-click)\n[![Test and Release](https://github.com/ittus/vue-long-click/actions/workflows/release.yml/badge.svg)](https://github.com/ittus/vue-long-click/actions/workflows/release.yml)\n![Size](https://badgen.net/bundlephobia/min/vue-long-click)\n\nCheckout the demo at https://ittus.github.io/vue-long-click/\n\n![DemoGIF](./images/demo.gif)\n\n## Install\n\n```bash\nnpm install vue-long-click --save\n```\n\n```javascript\nimport { longClickDirective } from 'vue-long-click'\n\nconst longClickInstance = longClickDirective({delay: 400, interval: 50})\nVue.directive('longclick', longClickInstance)\n```\n\n## CDN\n\nInclude vue-long-click library from cdn\n```html\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/vue@2.6.10/dist/vue.js\"\u003e\u003c/script\u003e\n\u003cscript src=\"https://unpkg.com/vue-long-click@0.0.4/dist/libs/vue-long-click.umd.min.js\"\u003e\u003c/script\u003e\n```\n\nand create custom directive to use\n\n```javascript\nconst longClickInstance = window['vue-long-click'].longClickDirective({delay: 400, interval: 50})\nVue.directive('longclick', longClickInstance)\n```\n[CDN Demo on codepen](https://codepen.io/ittus/pen/BbeZOQ)\n\n\n## Usage\n\n```javascript\n\u003cbutton v-longclick=\"() =\u003e changeValue(1)\"\u003e+\u003c/button\u003e\n```\n\n## Config\n\n| Prop                  | Type            | Default     | Description                              |\n|-----------------------|-----------------|-------------|------------------------------------------|\n| delay                 | Integer (milliseconds)    |      400     | Delay until long click function is fired             |\n| interval                  | Integer (milliseconds)         |    50         | If value is greater than 0, handler function will be fire every `interval` milliseconds when component is pressed\n\n## Development\n\n```bash\n## Project setup\nnpm install\n\n## Compiles and hot-reloads for development\nnpm run serve\n\n## Build library\nnpm run build:lib\n\n## Run tests\nnpm run test\n\n## Lints and fixes files\nnpm run lint\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fittus%2Fvue-long-click","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fittus%2Fvue-long-click","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fittus%2Fvue-long-click/lists"}