{"id":13723695,"url":"https://github.com/sveltejs/gestures","last_synced_at":"2025-10-19T08:31:31.195Z","repository":{"id":46327368,"uuid":"174030162","full_name":"sveltejs/gestures","owner":"sveltejs","description":"Svelte actions for cross-platform gesture detection","archived":false,"fork":false,"pushed_at":"2022-12-03T00:59:36.000Z","size":41,"stargazers_count":88,"open_issues_count":8,"forks_count":7,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-29T14:31:50.538Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sveltejs.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-03-05T22:27:43.000Z","updated_at":"2024-09-27T18:21:09.000Z","dependencies_parsed_at":"2023-01-22T18:45:06.782Z","dependency_job_id":null,"html_url":"https://github.com/sveltejs/gestures","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Fgestures","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Fgestures/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Fgestures/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sveltejs%2Fgestures/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sveltejs","download_url":"https://codeload.github.com/sveltejs/gestures/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236991472,"owners_count":19237577,"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":[],"created_at":"2024-08-03T01:01:44.521Z","updated_at":"2025-10-19T08:31:25.932Z","avatar_url":"https://github.com/sveltejs.png","language":"TypeScript","readme":"# @sveltejs/gestures\n\nA (work-in-progress) collection of gesture recognisers for Svelte components.\n\nEach recogniser is implemented as an action that emits custom events. Pointer events are used where possible, falling back to mouse and touch events.\n\n\n## tap ([demo](https://v3.svelte.technology/repl?version=3.0.0-beta.10\u0026gist=ffbdb659f2c52c8510bec42af3ffb0d1))\n\nThis action fires a `tap` event when the user taps on an element with either a mouse or a finger (or other pointing device). If the pointer is down for more than 300ms, it doesn't count, unlike with `click` events.\n\nPressing the spacebar on a focused button will also fire a `tap` event. Taps on disabled form elements are disregarded.\n\nThe `event.detail` object has `x` and `y` properties corresponding to `clientX` and `clientY`. If the original event was a spacebar keypress, both are `null`.\n\n```html\n\u003cscript\u003e\n  import { tap } from '@sveltejs/gestures';\n\n  function handler(event) {\n    console.log(`the button was tapped at ${event.detail.x}, ${event.detail.y}`);\n  }\n\u003c/script\u003e\n\n\u003cbutton use:tap on:tap={handler}\u003e\n  tap the button\n\u003c/button\u003e\n```\n\nTODO: `pan`, `swipe`, `rotate`, `pinch`, `press`\n\n\n## License\n\n[LIL](LICENSE)","funding_links":[],"categories":["components and libraries"],"sub_categories":["interaction"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveltejs%2Fgestures","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsveltejs%2Fgestures","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsveltejs%2Fgestures/lists"}