{"id":22105217,"url":"https://github.com/zhangyu1818/simple-carousel","last_synced_at":"2025-07-26T16:09:15.221Z","repository":{"id":57359839,"uuid":"174827272","full_name":"zhangyu1818/simple-carousel","owner":"zhangyu1818","description":"a simple carousel,without jQuery","archived":false,"fork":false,"pushed_at":"2023-11-21T07:37:29.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-02T08:57:15.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://zhangyu1818.github.io/simple-carousel/","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/zhangyu1818.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":"2019-03-10T13:27:55.000Z","updated_at":"2023-07-05T09:08:44.000Z","dependencies_parsed_at":"2023-11-21T08:43:33.649Z","dependency_job_id":null,"html_url":"https://github.com/zhangyu1818/simple-carousel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zhangyu1818/simple-carousel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Fsimple-carousel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Fsimple-carousel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Fsimple-carousel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Fsimple-carousel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhangyu1818","download_url":"https://codeload.github.com/zhangyu1818/simple-carousel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhangyu1818%2Fsimple-carousel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267191044,"owners_count":24050318,"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-07-26T02:00:08.937Z","response_time":62,"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":[],"created_at":"2024-12-01T06:39:52.684Z","updated_at":"2025-07-26T16:09:15.175Z","avatar_url":"https://github.com/zhangyu1818.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simple-carousel\n\na simple carousel,without jQuery\n\n**Preview**\n\nlive [demo](https://zhangyu1818.github.io/simple-carousel/)\n\n# Installation\n\n`npm install simple-carousel-js`\n\n# Usage\n\n```javascript\nimport Carousel from 'simple-carousel-js';\n\nconst img = ['./1.jpg', './2.jpg', './3.jpg'];\n\nconst carousel = new Carousel(img, {\n    // default options\n    width: '100vw', // px、rem ...\n    height: '50vh',\n    element: '.carousel', // use document.querySelector(selector)\n    duration: 1, // animation duration\n    tween: 'Quart.easeOut', \n    pagination: true, // show pagination\n    arrowButton: true, // show prev and next button\n    momentum: 1, // turn to next page in a smaller number\n    autoplay: true,\n    autoplayDelay: 5,\n    preventDefault: false,\n    scale: false, // it's occurs when dragging\n    // custom class name，string or string array\n    customStyles: {\n        imgClass: '',\n        paginationClass: '',\n        dotClass: '',\n        prevButtonClass: '',\n        nextButtonClass: '',\n    },\n});\n\n// destroy,remove carousel html and event\ncarousel.destroy()\n```\nSee [tween](https://www.zhangxinxu.com/study/201612/how-to-use-tween-js.html)\n\nAlso,you can use `script` tag\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangyu1818%2Fsimple-carousel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhangyu1818%2Fsimple-carousel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhangyu1818%2Fsimple-carousel/lists"}