{"id":19312162,"url":"https://github.com/bigcommerce/themes-lib-swipe-fade","last_synced_at":"2026-07-29T11:31:34.210Z","repository":{"id":43901553,"uuid":"373508933","full_name":"bigcommerce/themes-lib-swipe-fade","owner":"bigcommerce","description":null,"archived":false,"fork":false,"pushed_at":"2023-10-10T13:53:32.000Z","size":1165,"stargazers_count":0,"open_issues_count":18,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-07-17T06:47:08.960Z","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":null,"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-03T13:01:38.000Z","updated_at":"2023-10-06T20:45:57.000Z","dependencies_parsed_at":"2024-11-10T00:43:34.113Z","dependency_job_id":null,"html_url":"https://github.com/bigcommerce/themes-lib-swipe-fade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/bigcommerce/themes-lib-swipe-fade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-swipe-fade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-swipe-fade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-swipe-fade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-swipe-fade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bigcommerce","download_url":"https://codeload.github.com/bigcommerce/themes-lib-swipe-fade/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bigcommerce%2Fthemes-lib-swipe-fade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279019126,"owners_count":26086680,"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-10-14T02:00:06.444Z","response_time":60,"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:20.482Z","updated_at":"2025-10-14T14:32:57.866Z","avatar_url":"https://github.com/bigcommerce.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bigcommerce Product Image Galleries\n\nMake the product images change. Make them change differently based on screen size.\n\n### Installation\n\n```\nnpm i --save github:pixelunion/bc-swipe-fade\n```\n\n### Usage\n\n```\nimport $ from 'jquery';\nimport SwipeFade from 'bc-swipe-fade';\n\nlet gallery = new SwipeFade({\n  el: $('.product-slides-container'),\n  callback: (index, el) {\n    console.log(`welcome to slide number ${index}`);\n  }\n});\n```\n\n\n### Options\n\n`el`: A jQuery object of our gallery container.\n`callback`: a function to run after each slide change.\n\n### Some sample markup\n\n```\n\u003cdiv class=\"product-slides-container\"\u003e\n  \u003cdiv class=\"product-slides-wrap\"\u003e\n    \u003cdiv class=\"product-slide\"\u003e\n      \u003cimg src=\"demo/images/photo-1.jpg\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"product-slide\"\u003e\n      \u003cimg src=\"demo/images/photo-2.jpg\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"product-slide\"\u003e\n      \u003cimg src=\"demo/images/photo-3.jpg\"\u003e\n    \u003c/div\u003e\n    \u003cdiv class=\"product-slide\"\u003e\n      \u003cimg src=\"demo/images/photo-4.jpg\"\u003e\n    \u003c/div\u003e\n  \u003c/div\u003e\n\u003c/div\u003e\n```\n\nThe module is classname agnositc but remember to wrap your slides in TWO elements.\n\n### Methods\n\n`.change(index)`: Switch to a slide\n\n`.next()` and `prev()` are available as well.\n\n### Responsiveness\n\nThe module will watch for an `:after` pseudoelement on the same element with which the module is initialized. If the `:after` element has a `content: 'swipe';` property, the module will arrange itself as a touch-driven swipe gallery. If not, it will fade. CSS is therefore a little specific:\n\n### Important CSS\n\n```\n.product-slides-container {\n  position: relative;\n  overflow: hidden;\n}\n\n.product-slides-wrap {\n  position: relative;\n  overflow: hidden;\n}\n\n@media(swiping-breakpoint) {\n  .product-slides-container {\n    \u0026:after {\n      display: none;\n      content: \"swipe\";\n    }\n  }\n\n  .product-slide {\n    position: relative;\n    float: left;\n    width: 100%;\n    transition: all 0.2s ease;\n  }\n}\n\n@media(fading-breakpoint) {\n  .product-slide {\n    position: absolute;\n    top: 0;\n    left: 0;\n    z-index: -1;\n    opacity: 0;\n\n    \u0026.current {\n      z-index: auto;\n      opacity: 1;\n    }\n  }\n}\n\n```\n\n\n### Navigation\n\nThe module currently does not include any navigation by default. Make use of the callback and public methods to bake your own. Have a look at the demo.\n\n### Todo\n- Make use of jquery.trend for handling transition events\n- Make fading work for IE8 (opacity)\n- Further es6ification\n\n### Further Development\n\nFor debugging or improvements you can run a standalone test version of the module 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-swipe-fade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbigcommerce%2Fthemes-lib-swipe-fade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbigcommerce%2Fthemes-lib-swipe-fade/lists"}