{"id":21207503,"url":"https://github.com/ranjeetsinghbnl/s-swipe","last_synced_at":"2026-05-19T11:31:09.757Z","repository":{"id":129697466,"uuid":"239280613","full_name":"ranjeetsinghbnl/s-swipe","owner":"ranjeetsinghbnl","description":"Stencil Swipe Component is a simple component that detects finger swipe events on touch devices and trigger custom events as you swiped-left, swiped-right, swiped-up and swiped-down on an element.","archived":false,"fork":false,"pushed_at":"2020-02-09T10:02:53.000Z","size":8,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T23:29:03.639Z","etag":null,"topics":["stencil-components","stenciljs","swipe-gestures","typescript","webcomponent"],"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/ranjeetsinghbnl.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-09T09:52:15.000Z","updated_at":"2021-10-27T15:10:08.000Z","dependencies_parsed_at":"2023-08-30T06:15:20.704Z","dependency_job_id":null,"html_url":"https://github.com/ranjeetsinghbnl/s-swipe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ranjeetsinghbnl/s-swipe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjeetsinghbnl%2Fs-swipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjeetsinghbnl%2Fs-swipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjeetsinghbnl%2Fs-swipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjeetsinghbnl%2Fs-swipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ranjeetsinghbnl","download_url":"https://codeload.github.com/ranjeetsinghbnl/s-swipe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ranjeetsinghbnl%2Fs-swipe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33214280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:54:09.561Z","status":"ssl_error","status_checked_at":"2026-05-19T07:54:08.508Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["stencil-components","stenciljs","swipe-gestures","typescript","webcomponent"],"created_at":"2024-11-20T20:59:00.069Z","updated_at":"2026-05-19T11:31:09.737Z","avatar_url":"https://github.com/ranjeetsinghbnl.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Built With Stencil](https://img.shields.io/badge/-Built%20With%20Stencil-16161d.svg?logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDE5LjIuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQnVpbGQgMCkgIC0tPgo8c3ZnIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIHg9IjBweCIgeT0iMHB4IgoJIHZpZXdCb3g9IjAgMCA1MTIgNTEyIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91bmQ6bmV3IDAgMCA1MTIgNTEyOyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI%2BCjxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI%2BCgkuc3Qwe2ZpbGw6I0ZGRkZGRjt9Cjwvc3R5bGU%2BCjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MjQuNywzNzMuOWMwLDM3LjYtNTUuMSw2OC42LTkyLjcsNjguNkgxODAuNGMtMzcuOSwwLTkyLjctMzAuNy05Mi43LTY4LjZ2LTMuNmgzMzYuOVYzNzMuOXoiLz4KPHBhdGggY2xhc3M9InN0MCIgZD0iTTQyNC43LDI5Mi4xSDE4MC40Yy0zNy42LDAtOTIuNy0zMS05Mi43LTY4LjZ2LTMuNkgzMzJjMzcuNiwwLDkyLjcsMzEsOTIuNyw2OC42VjI5Mi4xeiIvPgo8cGF0aCBjbGFzcz0ic3QwIiBkPSJNNDI0LjcsMTQxLjdIODcuN3YtMy42YzAtMzcuNiw1NC44LTY4LjYsOTIuNy02OC42SDMzMmMzNy45LDAsOTIuNywzMC43LDkyLjcsNjguNlYxNDEuN3oiLz4KPC9zdmc%2BCg%3D%3D\u0026colorA=16161d\u0026style=flat-square)\n\n# `\u003cs-swipe/\u003e`\n\nStencil Swipe Component is a simple component that detects finger swipe events on touch devices and trigger custom events as you swiped-left, swiped-right, swiped-up and swiped-down on an element.\n\nYou can detect swipe on any html element easily \n\n```html\n\u003cs-swipe\nthreshold-x=\"100\"  \nthreshold-y=\"30\"  \ntime-threshold=\"30\"\n\u003e\n    Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's\n    standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a\n    type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,\n    remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing\n    Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of\n    Lorem Ipsum.\n\u003c/s-swipe\u003e\n```\n\nFor more guides on stencil.js components, please [check](https://stenciljs.com/docs/component) their documentation.\n\n## Getting Started\n\nTo start building a new web component using Stencil, clone this repo to a new directory:\n\n```bash\ngit clone https://github.com/ranjeetsinghbnl/s-swipe.git s-swipe\ncd s-swipe\ngit remote rm origin\n```\n\nand run:\n\n```bash\nnpm install\nnpm start\n```\n\nTo build the component for production, run:\n\n```bash\nnpm run build\n```\n\nTo run the unit tests for the components, run:\n\n```bash\nnpm test\n```\n\n\n## Using this component\n\n### Script tag\n\n- [Publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages)\n- Put a script tag similar to this `\u003cscript src='https://unpkg.com/s-swipe@0.0.1/dist/s-swipe.js'\u003e\u003c/script\u003e` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### Node Modules\n- Run `npm install s-swipe --save`\n- Put a script tag similar to this `\u003cscript src='node_modules/s-swipe/dist/s-swipe.js'\u003e\u003c/script\u003e` in the head of your index.html\n- Then you can use the element anywhere in your template, JSX, html etc\n\n### In a stencil-starter app\n- Run `npm install s-swipe --save`\n- Add an import to the npm packages `import s-swipe;`\n- Then you can use the element anywhere in your template, JSX, html etc\n\nFor more details you can also check the official [integration guide](https://stenciljs.com/docs/javascript).\n\n\n## Properties\n\n| Property        | Attribute        | Description | Type     | Default |\n| --------------- | ---------------- | ----------- | -------- | ------- |\n| `thresholdX`    | `threshold-x`    | `x axis threshold`            | `number` | `30`    |\n| `thresholdY`    | `threshold-y`    | `y axis threshold`            | `number` | `30`    |\n| `timeThreshold` | `time-threshold` |  `time threshold`           | `number` | `100`   |\n\n\n```javascript\ninterface ISwipeEvent {\n  up: boolean;\n  down: boolean;\n  left: boolean;\n  right: boolean;\n}\n```\n\n\n## Events\n\n| Event    | Description | Type                       |\n| -------- | ----------- | -------------------------- |\n| `sSwipe` |             | `CustomEvent\u003cISwipeEvent\u003e` |","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjeetsinghbnl%2Fs-swipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Franjeetsinghbnl%2Fs-swipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Franjeetsinghbnl%2Fs-swipe/lists"}