{"id":13827586,"url":"https://github.com/amio/re-carousel","last_synced_at":"2025-04-04T15:12:00.088Z","repository":{"id":5648597,"uuid":"53563828","full_name":"amio/re-carousel","owner":"amio","description":"Minimal carousel component for React.","archived":false,"fork":false,"pushed_at":"2023-02-27T20:56:06.000Z","size":4542,"stargazers_count":273,"open_issues_count":34,"forks_count":50,"subscribers_count":9,"default_branch":"master","last_synced_at":"2024-10-15T01:23:49.554Z","etag":null,"topics":["carousel","carousel-component","react","react-carousel"],"latest_commit_sha":null,"homepage":"https://amio.github.io/re-carousel/","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/amio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-03-10T07:17:28.000Z","updated_at":"2024-08-22T20:17:42.000Z","dependencies_parsed_at":"2024-01-14T20:18:48.926Z","dependency_job_id":"aea84c93-4cf1-4ae7-99d0-374f32e52214","html_url":"https://github.com/amio/re-carousel","commit_stats":{"total_commits":126,"total_committers":10,"mean_commits":12.6,"dds":"0.32539682539682535","last_synced_commit":"22be33389df3e58d433133aa284e90d3d24eab53"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fre-carousel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fre-carousel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fre-carousel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amio%2Fre-carousel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amio","download_url":"https://codeload.github.com/amio/re-carousel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198469,"owners_count":20900081,"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","react","react-carousel"],"created_at":"2024-08-04T09:02:02.481Z","updated_at":"2025-04-04T15:12:00.066Z","avatar_url":"https://github.com/amio.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# re-carousel [![npm-version][npm-badge]][npm-link] [![size][size-src]][size-link]\n\nMinimal carousel component for React.\n\ndemo: https://amio.github.io/re-carousel/\n\n### Usage\n\n`import Carousel from 're-carousel'`\n\nthen:\n\n```jsx\n\u003cCarousel auto\u003e\n  \u003cdiv style={{backgroundColor: 'tomato', height: '100%'}}\u003eFrame 1\u003c/div\u003e\n  \u003cdiv style={{backgroundColor: 'orange', height: '100%'}}\u003eFrame 2\u003c/div\u003e\n  \u003cdiv style={{backgroundColor: 'orchid', height: '100%'}}\u003eFrame 3\u003c/div\u003e\n\u003c/Carousel\u003e\n```\n\n### Attributes\n\nAll attributes are optional.\n\n- `axis` {Enum} `'x'` or `'y'` (`'x'` by default)\n- `loop` {Boolean} `true` or `false` (`false` by default) toggle loop mode.\n- `auto` {Boolean} `true` or `false` (`false` by default) toggle auto sliding.\n- `interval` {Number} (`4000`ms by default) interval for auto sliding.\n- `duration` {Number} (`300`ms by default) duration for animation.\n- `onTransitionEnd` {Function({ prev: HTMLElement, current: HTMLElement, next: HTMLElement})} on frames transition end callback.\n- `widgets` {Array of ReactClass} Indicator and switcher could be various,\n  so it's not builtin. Here's some example custom widgets\n  ([dots indicator](src/indicator-dots.js),\n  [prev/next buttons](src/buttons.js), [keyboard navigation](src/keyboard-navigator)):\n\n  ```javascript\n  import Carousel from 're-carousel'\n  import IndicatorDots from './indicator-dots'\n  import Buttons from './buttons'\n\n  export default function carousel () {\n    return \u003cCarousel loop auto widgets={[IndicatorDots, Buttons]}\u003e\n      \u003cdiv style={{backgroundColor: 'tomato', height: '100%'}}\u003eFrame 1\u003c/div\u003e\n      \u003cdiv style={{backgroundColor: 'orange', height: '100%'}}\u003eFrame 2\u003c/div\u003e\n      \u003cdiv style={{backgroundColor: 'orchid', height: '100%'}}\u003eFrame 3\u003c/div\u003e\n    \u003c/Carousel\u003e\n  }\n  ```\n- `frames` {Array of ReactElement} If you want to create frames programmatically,\n  use this attribute:\n\n  ```javascript\n  import Carousel from 're-carousel'\n\n  export default function carousel (props) {\n    const frames = props.frameArray.map((frame, i) =\u003e {\n      return \u003cdiv\u003eFrame {i}\u003c/div\u003e\n    })\n    return \u003cCarousel auto frames={frames}\u003e\n      \u003cspan\u003eThese children element will be appended to Carousel,\u003c/span\u003e\n      \u003cspan\u003eas normal element other than \"frame\".\u003c/span\u003e\n    \u003c/Carousel\u003e\n  }\n  ```\n- `className` {String} Custom class name.\n\n### Contributes\n\n```bash\nnpm run start # start local dev server\nnpm run build # build lib\nnpm run test  # run tests\n```\n\n## License\n\n[MIT][mit] © [Amio][author]\n\n[npm-badge]: https://badgen.net/npm/v/re-carousel\n[npm-link]: https://www.npmjs.com/package/re-carousel\n[size-src]: https://badgen.net/bundlephobia/minzip/re-carousel\n[size-link]: https://bundlephobia.com/result?p=re-carousel\n[mit]: http://opensource.org/licenses/MIT\n[author]: http://github.com/amio\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famio%2Fre-carousel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famio%2Fre-carousel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famio%2Fre-carousel/lists"}