{"id":21557094,"url":"https://github.com/shenfe/lite-swiper","last_synced_at":"2025-03-18T03:24:03.959Z","repository":{"id":143886505,"uuid":"97732770","full_name":"shenfe/lite-swiper","owner":"shenfe","description":"👆A lightweight swiper component for mobile frontend.","archived":false,"fork":false,"pushed_at":"2017-12-26T12:33:58.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T13:37:46.535Z","etag":null,"topics":["ui-component"],"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/shenfe.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":"2017-07-19T15:30:26.000Z","updated_at":"2018-01-09T17:23:25.000Z","dependencies_parsed_at":"2023-07-18T13:46:04.269Z","dependency_job_id":null,"html_url":"https://github.com/shenfe/lite-swiper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenfe%2Flite-swiper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenfe%2Flite-swiper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenfe%2Flite-swiper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shenfe%2Flite-swiper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shenfe","download_url":"https://codeload.github.com/shenfe/lite-swiper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244148339,"owners_count":20406160,"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":["ui-component"],"created_at":"2024-11-24T08:10:54.418Z","updated_at":"2025-03-18T03:24:03.921Z","avatar_url":"https://github.com/shenfe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lite-swiper\nA lightweight swiper component for mobile frontend.\n\n## Demo\n[Demo](http://shenfe.github.io/repos/lite-swiper/demo.html)\n\n## Usage\n\n```bash\nnpm install lite-swiper --save\n```\n\n### elements\nEnsure a container with [`width`, `height`, `overflow`] styles, an item wrapper, and several items:\n\n```html\n\u003cstyle\u003e\n    .container {\n        width: 100%;\n        height: 200px;\n        overflow: hidden;\n    }\n\u003c/style\u003e\n\u003cdiv id=\"my-swiper\" class=\"container\"\u003e\n    \u003cdiv class=\"items\"\u003e\n        \u003cdiv class=\"item\"\u003eitem1\u003c/div\u003e\n        \u003cdiv class=\"item\"\u003eitem2\u003c/div\u003e\n        \u003cdiv class=\"item\"\u003eitem3\u003c/div\u003e\n    \u003c/div\u003e\n\u003c/div\u003e\n```\n\n### script\nCreate an instance like this:\n\n```js\nvar Swipe = require('lite-swiper');\nvar $target = document.getElementById('my-swiper');\nvar mySwiper = new Swipe($target, {\n    cssText: {\n        item: '',\n        indicators: '',\n        indicator: '',\n        indicatorCurrent: ''\n    },\n    onmoved: function (index, indexBefore) {\n        console.log(`moved from ${indexBefore} to ${index}`);\n    }\n});\n```\n## License\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenfe%2Flite-swiper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshenfe%2Flite-swiper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshenfe%2Flite-swiper/lists"}