{"id":15025179,"url":"https://github.com/phucbm/flickity-responsive","last_synced_at":"2025-04-12T13:12:22.777Z","repository":{"id":63179455,"uuid":"395890971","full_name":"phucbm/flickity-responsive","owner":"phucbm","description":"💻📱The responsive Flickity wrapper serving 2M hits/month on jsDelivr","archived":false,"fork":false,"pushed_at":"2025-03-27T11:34:30.000Z","size":756,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-12T13:12:14.839Z","etag":null,"topics":["flickity","javascript","jquery","jquery-plugin","responsive"],"latest_commit_sha":null,"homepage":"https://flickity.netlify.app","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/phucbm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":null,"patreon":null,"open_collective":"phucbm","ko_fi":"phucbm","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-08-14T04:38:57.000Z","updated_at":"2025-03-27T11:34:34.000Z","dependencies_parsed_at":"2024-12-13T06:03:01.225Z","dependency_job_id":null,"html_url":"https://github.com/phucbm/flickity-responsive","commit_stats":{"total_commits":87,"total_committers":2,"mean_commits":43.5,"dds":0.1724137931034483,"last_synced_commit":"65486276b92cd2dd7f905c9f357e2ba17c43a08a"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fflickity-responsive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fflickity-responsive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fflickity-responsive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phucbm%2Fflickity-responsive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phucbm","download_url":"https://codeload.github.com/phucbm/flickity-responsive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248571876,"owners_count":21126522,"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":["flickity","javascript","jquery","jquery-plugin","responsive"],"created_at":"2024-09-24T20:01:40.355Z","updated_at":"2025-04-12T13:12:22.770Z","avatar_url":"https://github.com/phucbm.png","language":"JavaScript","funding_links":["https://opencollective.com/phucbm","https://ko-fi.com/phucbm"],"categories":[],"sub_categories":[],"readme":"# Flickity Responsive\n\n[![release](https://badgen.net/github/release/phucbm/flickity-responsive/)](https://github.com/phucbm/flickity-responsive/releases/latest)\n[![minified](https://badgen.net/badge/minified/7KB/cyan)](https://www.jsdelivr.com/package/gh/phucbm/flickity-responsive)\n[![jsdelivr](https://data.jsdelivr.com/v1/package/gh/phucbm/flickity-responsive/badge?style=rounded)](https://www.jsdelivr.com/package/gh/phucbm/flickity-responsive)\n[![npm weekly download](https://badgen.net/npm/dm/flickity-responsive)](https://www.npmjs.com/package/flickity-responsive)\n[![license](https://badgen.net/github/license/phucbm/flickity-responsive/)](https://github.com/phucbm/flickity-responsive/blob/main/LICENSE)\n[![Netlify Status](https://api.netlify.com/api/v1/badges/9f75e2e8-1ebf-4aa7-83f0-c4fb4942df2e/deploy-status)](https://app.netlify.com/sites/flickity/deploys)\n\n\u003e A vanilla JS plugin that adds `responsive` option for Flickity. And more extendable settings, see [#docs](#docs)\n\n## Introduction\n\n\u003e At the time of this plugin was made, Flickity does not officially offer any way to update the options on various\n\u003e screen-sizes.\n\nRead more about the issue here 👉 https://github.com/metafizzy/flickity/issues/233\n\nSo, I create a plugin that brings `responsive` to Flickity, just like the\nway [Slick](https://kenwheeler.github.io/slick/) works.\n\n## Getting started\n\nAdd the script to your project in this order 👇\n\n- jQuery (optional)\n- Flickity\n- `flickity-responsive`\n\n### NPM Package\n\nInstall NPM package\n\n```shell\nnpm i flickity-responsive\n```\n\nImport\n\n```js\nimport {FlickityResponsive} from \"flickity-responsive\";\n```\n\n### Download\n\n👉 Self hosted - [Download the latest release](https://github.com/phucbm/flickity-responsive/releases/latest)\n\n```html\n\n\u003cscript src=\"./flickity-responsive.min.js\"\u003e\u003c/script\u003e\n```\n\n👉 CDN Hosted - [jsDelivr](https://www.jsdelivr.com/package/gh/phucbm/flickity-responsive)\n\n```html\n\n\u003cscript src=\"https://cdn.jsdelivr.net/gh/phucbm/flickity-responsive@2.1.5/flickity-responsive.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nJust change the name, all other options stay the same.\n\n```js\n// init with vanilla JS\nconst carousel = new FlickityResponsive('.carousel', {\n    pageDots: false,\n    responsive: [\n        {\n            breakpoint: 768,\n            settings: {\n                prevNextButtons: false,\n                pageDots: true,\n            }\n        }\n    ]\n});\n```\n\n### Init with HTML\n\nUse data attribute to init Flickity Responsive, just exactly like Flickity.\n\n```html\n\n\u003cdiv data-flickity-responsive='{ \"cellAlign\": \"left\", \"contain\": true }'\u003e\n    \u003cdiv class=\"carousel-cell\"\u003e\u003c/div\u003e\n    \u003cdiv class=\"carousel-cell\"\u003e\u003c/div\u003e\n    \u003cdiv class=\"carousel-cell\"\u003e\u003c/div\u003e\n\u003c/div\u003e\n```\n\n\u003e ⚠️ Options set in HTML must be valid JSON.\n\n## Docs\n\nVisit https://flickity.netlify.app for examples.\n\n```js\nconst carousel = new FlickityResponsive('.carousel', {\n    contain: true, // default in Flickity Responsive\n\n    // Extra features 👇\n\n    // destroy\n    destroy: false,\n\n    // custom arrows\n    prevArrow: undefined, // DOM element, jQuery element\n    nextArrow: undefined, // DOM element, jQuery element\n\n    // indicator numbers\n    indicatorCurrent: undefined, // current slides, DOM element, jQuery element\n    indicatorTotal: undefined, // total slides, DOM element, jQuery element\n\n    // hide navigation elements if the slider is not slide-able\n    responsiveNavigation: true,\n\n    // indicator\n    indicatorZeroPad: false,\n    indicatorCurrent: undefined,\n    indicatorTotal: undefined,\n\n    // force move\n    forceMove: true, // make sure that every time an arrows clicked, the carousel will move\n\n    // aria hidden focus\n    ariaHiddenFocus: true, // Add tabindex=\"-1\" to all elements with or inside aria-hidden=\"true\"\n    ariaHiddenFocusSelector: `[aria-hidden=\"true\"] a, [aria-hidden=\"true\"] button`,\n});\n```\n\n## FYI\n\nThis plugin respects Flickity's API and use `matchMedia()` to know when to destroy and re-initialize the\ncarousel.\n\n\u003e **⚠️ Important note**: the `breakpoint` property is using CSS `max-width` logic. For instance, when you\n\u003e set `breakpoint:480`, that means responsive settings will be applied when the viewport is `\u003c=480px` (while Slick\n\u003e is `\u003c480px`). Let's be cleared 💎\n\n## Deployment\n\nBefore release, update version in `package.json` and `README.md`.\n\n```shell\n# Run dev server\nnpm run dev\n\n# Generate prod files\nnpm run prod\n\n# Publish package\nnpm publish\n\n# build\nnpm run build\n```\n\n## License\n\n[MIT License](https://github.com/phucbm/flickity-responsive/blob/master/LICENSE)\n\nCopyright (c) 2021-2025 Phuc Bui\n\n\u003e Please leave a star ⭐️ to support my work. Thank you!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphucbm%2Fflickity-responsive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphucbm%2Fflickity-responsive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphucbm%2Fflickity-responsive/lists"}