{"id":23053710,"url":"https://github.com/component/swipe","last_synced_at":"2025-04-03T04:25:07.988Z","repository":{"id":5613147,"uuid":"6820619","full_name":"component/swipe","owner":"component","description":"Swipe component with touch support (for image carousels, dynamic content etc)","archived":false,"fork":false,"pushed_at":"2015-04-15T16:27:44.000Z","size":593,"stargazers_count":61,"open_issues_count":10,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-04-13T20:23:08.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://component.github.com/swipe","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"alienjun/AJPhotoPicker","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/component.png","metadata":{"files":{"readme":"Readme.md","changelog":"History.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-11-23T00:41:45.000Z","updated_at":"2023-08-17T22:31:13.000Z","dependencies_parsed_at":"2022-09-22T03:50:13.322Z","dependency_job_id":null,"html_url":"https://github.com/component/swipe","commit_stats":null,"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fswipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fswipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fswipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/component%2Fswipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/component","download_url":"https://codeload.github.com/component/swipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246935373,"owners_count":20857396,"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-12-16T00:19:18.954Z","updated_at":"2025-04-03T04:25:07.946Z","avatar_url":"https://github.com/component.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Swipe\n\n  Swipe component with touch support, for image carousels or any other content. Try it out the [demo](http://component.github.com/swipe/) in your browser or on your device.\n\n## Installation\n\n    $ component install component/swipe\n\n## Events\n\n- `showing` (i, pane): when the transition to another pane begins\n- `show` (i, pane): when the transition to another pane finishes\n\n## API\n\n### Swipe(el)\n\n  Create a swipe object for `el`. This should be a container element\n  that wraps a list of several items. View ./example.html for a\n  working example.\n\n### .threshold(n)\n\n  Set the swipe threshold to `n`.\n\n  This is the factor required for swipe\n  to detect when a slide has passed the\n  given threshold, and may display the next\n  or previous slide. For example the default\n  of `.5` means that the user must swipe _beyond_\n  half of the side width.\n\n### .fastThreshold(ms)\n\n Set the \"fast\" swipe threshold to `ms`.\n\n This is the amount of time in milliseconds\n which determines if a swipe was \"fast\" or not. When\n the swipe's duration is less than `ms` only 1/10th of\n the slide's width must be exceeded to display the previous\n or next slide.\n\n### .duration(ms)\n\n  Set the transition duration, defaults to 300ms.\n\n### .interval(ms)\n\n  Set the cycle interval, defaults to 5000ms.\n\n### .refresh()\n\n  This method should be invoked when the swipe element\n  has been resized, or an item has been added or removed.\n\n### .play()\n\n  Play through all items using the cycle interval.\n\n### .stop()\n\n  Stop playing.\n\n### .isFirst()\n\n  Is on the first visible item.\n\n### .isLast()\n\n  Is on the last visisble item.\n\n### .prev()\n\n  Show the previous item if present, or do nothing.\n\n### .next()\n\n  Show the next item if present, or do nothing.\n\n### .show(i, [ms], [options])\n\n  Show item with the given index `i` with the given\n  transition in `ms` defaulting to the `.duration()` value.\n\n  You may pass `{ silent: true }` as an option to silence show events.\n\n## License\n\n  MIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fswipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomponent%2Fswipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomponent%2Fswipe/lists"}