{"id":19312175,"url":"https://github.com/bigcommerce/themes-lib-carousel","last_synced_at":"2026-06-17T19:31:49.126Z","repository":{"id":43901552,"uuid":"373505350","full_name":"bigcommerce/themes-lib-carousel","owner":"bigcommerce","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-10T13:53:05.000Z","size":1251,"stargazers_count":0,"open_issues_count":20,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2026-04-18T00:38:26.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/bigcommerce.png","metadata":{"files":{"readme":"readme.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","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":"2021-06-03T12:49:32.000Z","updated_at":"2023-05-05T05:51:41.000Z","dependencies_parsed_at":"2024-11-10T00:33:30.669Z","dependency_job_id":"e85e8f4e-d58e-4038-867d-7169b893baa1","html_url":"https://github.com/bigcommerce/themes-lib-carousel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bigcommerce/themes-lib-carousel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-carousel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-carousel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-carousel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-carousel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/themes-lib-carousel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-carousel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34463552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"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-11-10T00:33:26.371Z","updated_at":"2026-06-17T19:31:49.110Z","avatar_url":"https://github.com/bigcommerce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bigcommerce Carousel Module\n\nMake the big images change.\n\n*Caveat:* Right now the functionality of the pause-on-mouseover and pause-on-blur isn't jiving so great with in-browser pause \u0026 play buttons. We don't think anyone is using pause \u0026 play buttons, but just so you're aware.\n\n### Important Note\nAs of version 3.0.0, make sure to SCSS references in `theme.scss` to match.\n\n### Installation\n\nNPM:\n```\nnpm install --save github:/pixelunion/bc-carousel\n```\n\n### Usage\n\n```\nimport $ from 'jquery';\nimport Carousel from 'bc-carousel';\n\nnew Carousel({\n  el: $('.carousel');\n  delay: 4000\n});\n```\n\n### Options are self-explanatory\n\n`el`: the jQuery object of our carousel container.\n`delay`: transition delay, in milliseconds.\n`pagination`: whether or not to include pagination dots (defaults to `false`).\n`autoplay`: whether or not to start playing right away (defaults to `true`).\n`dotText`: wheher or not to set an explicit text, or to use integers (defaults to `false`).\n`setHeight`: sets height of carousel to that of the tallest slide (defaults to `true`).\n`pauseOnWindowBlur`: pauses the slider when clicking away from the current window/tab (defaults to `false`).\n\n\n### Methods\n\n`play`: start slideshow looping.\n`pause`: stop slideshow loopting.\n`nextSlide`: show the next slide.\n`previousSlide`: show the previous slide.\n`changeSlide`: (`targetIndex, animationDirection = 'auto'`) show the slide at `targetIndex`, optionally specifying the animation class.\n\n### Events\n\nYou can listen to events on the `el` container.\n\n`carousel-resize`: the carousel is about to be resized.\n`carousel-resized`: the carousel has just been resized, typically after a window resize.\n`carousel-change`: the carousel is about to change slides. `from` and `to` indexes are passed into the event context.\n`carousel-changed`: the carousel has just changed slides. `from` and `to` indexes are passed into the event context.\n`carousel-play`: the carousel has started looping.\n`carousel-pause`: the carousel has stopped looping.\n\n```\nconst $carousel = $('.carousel');\n\nconst carousel = new Carousel({\n  el: $carousel,\n});\n\n$carousel.on('carousel-change', (e, context) =\u003e {\n  console.log(`carousel is changing from ${context.from} to ${context.to}`);\n});\n```\n\n### Some sample markup\n\n```\n\u003csection class=\"carousel\"\u003e\n  {{#each carousel}}\n    \u003cfigure class=\"carousel-item {{#if @first}}active{{/if}}\"\u003e\n      \u003ca class=\"carousel-item-image\" href=\"{{{url}}}\"\u003e\n        \u003cimg src=\"{{image}}\" alt=\"{{{alt_text}}}\" /\u003e\n      \u003c/a\u003e\n      \u003cfigcaption class=\"carousel-item-info\"\u003e\n        \u003ch2\u003e{{heading}}\u003c/h2\u003e\n        \u003cp\u003e{{text}}\u003c/p\u003e\n        \u003ca class=\"button\" href=\"{{{url}}}\"\u003e{{button_text}}\u003c/a\u003e\n      \u003c/figcaption\u003e\n    \u003c/figure\u003e\n  {{/each}}\n\n  \u003cdiv class=\"carousel-pagination\"\u003e\n    {{#for 0 ../slide_count}}\n      {{#if $index '!==' ../../slide_count}}\n        \u003cspan class=\"{{#if $index '===' 0}}active{{/if}}\" data-carousel-pagination-item data-slide=\"{{$index}}\"\u003e{{$index}}\u003c/span\u003e\n      {{/if}}\n    {{/for}}\n  \u003c/div\u003e\n\n  \u003cdiv class=\"carousel-navigation\"\u003e\n    \u003cspan class=\"carousel-navigation-item carousel-previous\"\u003e\u0026larr;\u003c/span\u003e\n    \u003cspan class=\"carousel-navigation-item carousel-next\"\u003e\u0026rarr;\u003c/span\u003e\n  \u003c/div\u003e\n\u003c/section\u003e\n```\n\n### Further Development\n\nFor debugging or improvements you can run a standalone test version of the carousel using a very basic node server:\n\n```\n$ npm install\n$ npm run serve\n```\nThis will allow you to make changes to the JS and HTML. To re-compile the scss you'll need to run `npm run build` from a separate terminal window after each change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-carousel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fthemes-lib-carousel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-carousel/lists"}