{"id":20461058,"url":"https://github.com/ericgj/carousel","last_synced_at":"2025-07-18T17:36:09.062Z","repository":{"id":9332911,"uuid":"11179448","full_name":"ericgj/carousel","owner":"ericgj","description":"Another simple carousel/slideshow component","archived":false,"fork":false,"pushed_at":"2013-07-18T02:25:08.000Z","size":132,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T11:34:18.657Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ericgj.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":"2013-07-04T14:37:40.000Z","updated_at":"2013-11-03T07:49:53.000Z","dependencies_parsed_at":"2022-09-05T07:50:06.292Z","dependency_job_id":null,"html_url":"https://github.com/ericgj/carousel","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ericgj/carousel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fcarousel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fcarousel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fcarousel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fcarousel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ericgj","download_url":"https://codeload.github.com/ericgj/carousel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ericgj%2Fcarousel/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265802055,"owners_count":23830508,"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-11-15T12:23:02.480Z","updated_at":"2025-07-18T17:36:09.042Z","avatar_url":"https://github.com/ericgj.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# carousel\n\n  Another simple carousel/slideshow component\n\n  Note no swipe support is included (or planned). If you need a swipeable \n  carousel, use [component/swipe][swipe].\n\n## Installation\n\n    $ component install ericgj/carousel\n\n## Example\n\n```javascript\n  \n  var carousel = require('carousel')('#root \u003e .item')\n  carousel.autoplay(6000);\n  carousel.width(4);\n  carousel.transition('animated bounce-in-left');\n  window.onload = function(){\n    carousel.start();\n  }\n\n```\n\n## API\n\n### Carousel( els:NodeList|String, length )\n\n  Construct a carousel of given elements, or using given selector query.\n  Optionally specify a maximum length of elements, otherwise it will cycle\n  through all given/selected elements.\n\n### Carousel#length( n )\n\n  Limit of total elements in carousel. Defaults to all given/selected elements.\n\n### Carousel#width( n )\n\n  Set width of carousel 'window' (i.e., how many elements shown each cycle). \n  Defaults to 1.\n\n### Carousel#next\n\n  Display next 'window' of elements\n\n### Carousel#prev\n\n  Display previous 'window' of elements\n\n### Carousel#autoplay( msecs )\n\n  Define the duration each element 'window' is displayed before advancing to \n  next, in milliseconds.\n\n### Carousel#start\n\n  Start autoplay\n\n### Carousel#stop\n\n  Stop autoplay\n\n### Carousel#transition( css:String )\n\n  CSS class(es) to be added to elements as they are shown. Defaults to \n  'transition'.\n  \n## Notes\n\n- This carousel does not currently rearrange elements but only shows/hides\n  them. Because of this, if your cycle width is not a factor of the total\n  length of elements, you may see elements 'out of order' when they cycle\n  around to the beginning.\n\n- You should add `.hide { display: none; }` for hiding inactive elements.\n\n- For [animate.css][animate] style transitions, check [test\\index.html][test] \n  for an example. Note 'exit' transitions aren't currently supported by this\n  carousel.\n\n## License\n\n  MIT\n\n[swipe]: https://github.com/component/swipe\n[test]:  https://github.com/ericgj/carousel/blob/master/test/index.html\n[animate]: http://daneden.me/animate/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericgj%2Fcarousel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fericgj%2Fcarousel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fericgj%2Fcarousel/lists"}