{"id":24581374,"url":"https://github.com/aprilmintacpineda/inferno-carousel","last_synced_at":"2025-03-17T16:19:19.014Z","repository":{"id":57273616,"uuid":"144349704","full_name":"aprilmintacpineda/inferno-carousel","owner":"aprilmintacpineda","description":"Carousel component for InfernoJS.","archived":false,"fork":false,"pushed_at":"2018-12-10T13:43:12.000Z","size":792,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T16:16:38.861Z","etag":null,"topics":["carousel","carousel-component","inferno","inferno-components","inferno-js"],"latest_commit_sha":null,"homepage":"https://aprilmintacpineda.github.io/inferno-carousel/","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/aprilmintacpineda.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}},"created_at":"2018-08-11T02:40:00.000Z","updated_at":"2019-01-07T00:32:15.000Z","dependencies_parsed_at":"2022-09-17T02:23:04.790Z","dependency_job_id":null,"html_url":"https://github.com/aprilmintacpineda/inferno-carousel","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprilmintacpineda%2Finferno-carousel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprilmintacpineda%2Finferno-carousel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprilmintacpineda%2Finferno-carousel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aprilmintacpineda%2Finferno-carousel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aprilmintacpineda","download_url":"https://codeload.github.com/aprilmintacpineda/inferno-carousel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244066191,"owners_count":20392407,"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":["carousel","carousel-component","inferno","inferno-components","inferno-js"],"created_at":"2025-01-24T02:56:16.524Z","updated_at":"2025-03-17T16:19:18.990Z","avatar_url":"https://github.com/aprilmintacpineda.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!-- @format --\u003e\n\n# inferno-carousel\n\nCarousel component for InfernoJS.\n\nSee [Demo](https://aprilmintacpineda.github.io/inferno-carousel/).\n\n## install\n\n```sh\nnpm i -s inferno-carousel js-carousel\n```\n\n## Usage\n\nOn your main entry file:\n\n```jsx\nimport 'js-carousel';\n```\n\nThen, whenever you want to use the component.\n\n```jsx\nimport InfernoCarousel from 'inferno-carousel';\n```\n\nThen:\n\n```jsx\n\u003cInfernoCarousel animationSpeed={500} itemDuration={5000} swipeThreshold={150}\u003e\n  \u003cimg src=\"path-to-image\" /\u003e\n  \u003cimg src=\"path-to-image\" /\u003e\n  \u003cimg src=\"path-to-image\" /\u003e\n  \u003cimg src=\"path-to-image\" /\u003e\n  \u003cimg src=\"path-to-image\" /\u003e\n\u003c/InfernoCarousel\u003e\n```\n\nYou can also specify a `className` for the container of the carousel by providing a `className` prop to it.\n\n- `animationSpeed` is the speed (in terms of milliseconds) of the transition animation.\n- `itemDuration` is the amount of time (in terms of milliseconds) it has to wait before transitioning to the next item.\n- `swipeThreshold` is the sensitivity of swipe, the lower the number the more sensitive the swipe will be, you don't want it to be very high otherwise the users would have a hard time navigating around using swipe. You don't want it to be very low, otherwise a click might become enough to navigate around using swipe. I suggest starting at `150` and tweaking it from there according to how you like it.\n\nIf you expect your images to change (you can see this on the demo), you should provide a key to the component and make sure that the key is different for every changes like so:\n\n```jsx\n\u003cInfernoCarousel\n  key={this.state.carouselImages.key}\n  animationSpeed={500}\n  itemDuration={5000}\n  swipeThreshold={150}\u003e\n  {this.state.carouselImages.srcs.map(src =\u003e {\n    \u003cimg key={src} src={src} /\u003e;\n  })}\n\u003c/InfernoCarousel\u003e\n```\n\n```js\n// upon updating\nthis.setState({\n  carouselImages: {\n    // the key would be different from the last one\n    key: this.state.carouselImages.key + 1,\n    src\n  }\n});\n```\n\n`inferno-carousel` uses [js-carousel](https://github.com/aprilmintacpineda/js-carousel).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprilmintacpineda%2Finferno-carousel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faprilmintacpineda%2Finferno-carousel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faprilmintacpineda%2Finferno-carousel/lists"}