{"id":13421999,"url":"https://github.com/xiaolin/react-image-gallery","last_synced_at":"2026-02-07T09:08:43.547Z","repository":{"id":27951466,"uuid":"31444190","full_name":"xiaolin/react-image-gallery","owner":"xiaolin","description":"React carousel image gallery component with thumbnail support  🖼","archived":false,"fork":false,"pushed_at":"2026-02-05T04:05:33.000Z","size":73145,"stargazers_count":3926,"open_issues_count":0,"forks_count":717,"subscribers_count":38,"default_branch":"master","last_synced_at":"2026-02-05T16:39:36.775Z","etag":null,"topics":["carousel","gallery","image-gallery","image-slider","react","react-carousel","react-component","react-components","react-image-gallery","react-image-slider","slide-images"],"latest_commit_sha":null,"homepage":"http://linxtion.com/demo/react-image-gallery","language":"TypeScript","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/xiaolin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-02-27T23:41:41.000Z","updated_at":"2026-02-05T04:05:36.000Z","dependencies_parsed_at":"2024-01-15T19:41:50.927Z","dependency_job_id":"aa12064c-122b-42c4-aff6-115f906ee013","html_url":"https://github.com/xiaolin/react-image-gallery","commit_stats":{"total_commits":574,"total_committers":93,"mean_commits":6.172043010752688,"dds":0.3240418118466899,"last_synced_commit":"6201e514891d7f1ac1e30346fa5baa94b495644a"},"previous_names":["linxtion/react-image-gallery"],"tags_count":99,"template":false,"template_full_name":null,"purl":"pkg:github/xiaolin/react-image-gallery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaolin%2Freact-image-gallery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaolin%2Freact-image-gallery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaolin%2Freact-image-gallery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaolin%2Freact-image-gallery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xiaolin","download_url":"https://codeload.github.com/xiaolin/react-image-gallery/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xiaolin%2Freact-image-gallery/sbom","scorecard":{"id":591646,"data":{"date":"2025-08-04","repo":{"name":"github.com/xiaolin/react-image-gallery","commit":"f8de088da95ce5299991e482a2995de23dae223f"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":3.6,"checks":[{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":2,"reason":"Found 6/23 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":9,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/eslint.yml:27","Info: jobLevel 'actions' permission set to 'read': .github/workflows/eslint.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/eslint.yml:26","Info: jobLevel 'actions' permission set to 'read': .github/workflows/eslint.yml:46","Info: jobLevel 'contents' permission set to 'read': .github/workflows/eslint.yml:44","Warn: jobLevel 'security-events' permission set to 'write': .github/workflows/eslint.yml:45","Warn: no topLevel permission defined: .github/workflows/eslint.yml:1"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/eslint.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/xiaolin/react-image-gallery/eslint.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/eslint.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/xiaolin/react-image-gallery/eslint.yml/master?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-xffm-g5w8-qvg7","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-4www-5p9h-95mh","Warn: Project is vulnerable to: GHSA-9gqv-wp59-fq42","Warn: Project is vulnerable to: GHSA-76c9-3jph-rj3q","Warn: Project is vulnerable to: GHSA-4v9v-hfq4-rm2v","Warn: Project is vulnerable to: GHSA-9jgg-88mc-972h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-20T22:06:03.921Z","repository_id":27951466,"created_at":"2025-08-20T22:06:03.921Z","updated_at":"2025-08-20T22:06:03.921Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29190842,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["carousel","gallery","image-gallery","image-slider","react","react-carousel","react-component","react-components","react-image-gallery","react-image-slider","slide-images"],"created_at":"2024-07-30T23:00:35.288Z","updated_at":"2026-02-07T09:08:43.525Z","avatar_url":"https://github.com/xiaolin.png","language":"TypeScript","readme":"# React Image Gallery\n\n**A responsive, customizable image gallery component for React**\n\n\u003cbr /\u003e\n\n[![npm version](https://badge.fury.io/js/react-image-gallery.svg)](https://badge.fury.io/js/react-image-gallery)\n[![Download Count](http://img.shields.io/npm/dm/react-image-gallery.svg?style=flat)](https://www.npmjs.com/package/react-image-gallery)\n[![Bundle size](https://badgen.net/bundlephobia/minzip/react-image-gallery)](https://bundlephobia.com/package/react-image-gallery)\n[![CI](https://github.com/xiaolin/react-image-gallery/actions/workflows/ci.yml/badge.svg)](https://github.com/xiaolin/react-image-gallery/actions/workflows/ci.yml)\n[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue.svg)](https://www.typescriptlang.org/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n\u003cbr /\u003e\n\n▶️ **[VIEW LIVE DEMO](http://linxtion.com/demo/react-image-gallery)**\n\n\u003cbr /\u003e\n\n![React Image Gallery Demo](https://github.com/xiaolin/react-image-gallery/raw/master/static/ig-demo.gif)\n\n\u003cbr /\u003e\n\n## ✨ Features\n\n| Feature              | Description                                               |\n| -------------------- | --------------------------------------------------------- |\n| 📱 **Mobile Swipe**  | Native touch gestures for smooth mobile navigation        |\n| 🖼️ **Thumbnails**    | Customizable thumbnail navigation with multiple positions |\n| 📺 **Fullscreen**    | Browser fullscreen or CSS-based fullscreen modes          |\n| 🎨 **Theming**       | CSS custom properties for easy styling                    |\n| ⌨️ **Keyboard Nav**  | Arrow keys, escape, and custom key bindings               |\n| 🔄 **RTL Support**   | Right-to-left language support                            |\n| ↕️ **Vertical Mode** | Slide vertically instead of horizontally                  |\n| 🎬 **Custom Slides** | Render videos, iframes, or any custom content             |\n\n\u003cbr /\u003e\n\n## 🚀 Getting Started\n\n```\nnpm install react-image-gallery\n```\n\n```tsx\nimport { useRef } from \"react\";\nimport ImageGallery from \"react-image-gallery\";\nimport type { GalleryItem, ImageGalleryRef } from \"react-image-gallery\";\n\nconst images: GalleryItem[] = [\n  {\n    original: \"https://picsum.photos/id/1018/1000/600/\",\n    thumbnail: \"https://picsum.photos/id/1018/250/150/\",\n  },\n  {\n    original: \"https://picsum.photos/id/1015/1000/600/\",\n    thumbnail: \"https://picsum.photos/id/1015/250/150/\",\n  },\n  {\n    original: \"https://picsum.photos/id/1019/1000/600/\",\n    thumbnail: \"https://picsum.photos/id/1019/250/150/\",\n  },\n];\n\nfunction MyGallery() {\n  const galleryRef = useRef\u003cImageGalleryRef\u003e(null);\n\n  return (\n    \u003cImageGallery\n      ref={galleryRef}\n      items={images}\n      onSlide={(index) =\u003e console.log(\"Slid to\", index)}\n    /\u003e\n  );\n}\n```\n\nFor more examples, see [`example/App.jsx`](https://github.com/xiaolin/react-image-gallery/blob/master/example/App.jsx)\n\n\u003cbr /\u003e\n\n## ⚙️ Props\n\n- `items`: (required) Array of objects. Available properties:\n  - `original` - image source URL\n  - `thumbnail` - thumbnail source URL\n  - `fullscreen` - fullscreen image URL (defaults to original)\n  - `originalHeight` - image height (html5 attribute)\n  - `originalWidth` - image width (html5 attribute)\n  - `loading` - \"lazy\" or \"eager\" (HTML5 attribute)\n  - `thumbnailHeight` - image height (html5 attribute)\n  - `thumbnailWidth` - image width (html5 attribute)\n  - `thumbnailLoading` - \"lazy\" or \"eager\" (HTML5 attribute)\n  - `originalClass` - custom image class\n  - `thumbnailClass` - custom thumbnail class\n  - `renderItem` - Function for custom rendering a specific slide (see renderItem below)\n  - `renderThumbInner` - Function for custom thumbnail renderer (see renderThumbInner below)\n  - `originalAlt` - image alt\n  - `thumbnailAlt` - thumbnail image alt\n  - `originalTitle` - image title\n  - `thumbnailTitle` - thumbnail image title\n  - `thumbnailLabel` - label for thumbnail\n  - `description` - description for image\n  - `srcSet` - image srcset (html5 attribute)\n  - `sizes` - image sizes (html5 attribute)\n  - `bulletClass` - extra class for the bullet of the item\n- `infinite`: Boolean, default `true` - loop infinitely\n- `lazyLoad`: Boolean, default `false`\n- `showNav`: Boolean, default `true`\n- `showThumbnails`: Boolean, default `true`\n- `thumbnailPosition`: String, default `bottom` - options: `top`, `right`, `bottom`, `left`\n- `showFullscreenButton`: Boolean, default `true`\n- `useBrowserFullscreen`: Boolean, default `true` - if false, uses CSS-based fullscreen\n- `useTranslate3D`: Boolean, default `true` - if false, uses `translate` instead of `translate3d`\n- `showPlayButton`: Boolean, default `true`\n- `isRTL`: Boolean, default `false` - right-to-left mode\n- `showBullets`: Boolean, default `false`\n- `maxBullets`: Number, default `undefined` - max bullets shown (minimum 3, active bullet stays centered)\n- `showIndex`: Boolean, default `false`\n- `autoPlay`: Boolean, default `false`\n- `disableThumbnailScroll`: Boolean, default `false` - disable thumbnail auto-scroll\n- `disableKeyDown`: Boolean, default `false` - disable keyboard navigation\n- `disableSwipe`: Boolean, default `false`\n- `disableThumbnailSwipe`: Boolean, default `false`\n- `onErrorImageURL`: String, default `undefined` - fallback image URL for failed loads\n- `indexSeparator`: String, default `' / '`, ignored if `showIndex` is false\n- `slideDuration`: Number, default `550` - slide transition duration (ms)\n- `swipingTransitionDuration`: Number, default `0` - transition duration while swiping (ms)\n- `slideInterval`: Number, default `3000`\n- `slideOnThumbnailOver`: Boolean, default `false`\n- `slideVertically`: Boolean, default `false` - slide vertically instead of horizontally\n- `flickThreshold`: Number, default `0.4` - swipe velocity threshold (lower = more sensitive)\n- `swipeThreshold`: Number, default `30` - percentage of slide width needed to trigger navigation\n- `stopPropagation`: Boolean, default `false` - call stopPropagation on swipe events\n- `startIndex`: Number, default `0`\n- `onImageError`: Function, `callback(event)` - overrides `onErrorImageURL`\n- `onThumbnailError`: Function, `callback(event)` - overrides `onErrorImageURL`\n- `onThumbnailClick`: Function, `callback(event, index)`\n- `onBulletClick`: Function, `callback(event, index)`\n- `onImageLoad`: Function, `callback(event)`\n- `onSlide`: Function, `callback(currentIndex)`\n- `onBeforeSlide`: Function, `callback(nextIndex)`\n- `onScreenChange`: Function, `callback(isFullscreen)`\n- `onPause`: Function, `callback(currentIndex)`\n- `onPlay`: Function, `callback(currentIndex)`\n- `onClick`: Function, `callback(event)`\n- `onTouchMove`: Function, `callback(event) on gallery slide`\n- `onTouchEnd`: Function, `callback(event) on gallery slide`\n- `onTouchStart`: Function, `callback(event) on gallery slide`\n- `onMouseOver`: Function, `callback(event) on gallery slide`\n- `onMouseLeave`: Function, `callback(event) on gallery slide`\n- `additionalClass`: String, additional class for the root node\n- `renderCustomControls`: Function, render custom controls on the current slide\n- `renderItem`: Function, custom slide rendering\n- `renderThumbInner`: Function, custom thumbnail rendering\n- `renderLeftNav`: Function, custom left nav component\n- `renderRightNav`: Function, custom right nav component\n- `renderTopNav`: Function, custom top nav component (vertical mode)\n- `renderBottomNav`: Function, custom bottom nav component (vertical mode)\n- `renderPlayPauseButton`: Function, custom play/pause button\n- `renderFullscreenButton`: Function, custom fullscreen button\n- `useWindowKeyDown`: Boolean, default `true` - use window or element for key events\n\n\u003cbr /\u003e\n\n## 🔧 Functions\n\nThe following functions can be accessed using [refs](https://reactjs.org/docs/refs-and-the-dom.html)\n\n- `play()`: starts the slideshow\n- `pause()`: pauses the slideshow\n- `togglePlay()`: toggles between play and pause\n- `fullScreen()`: enters fullscreen mode\n- `exitFullScreen()`: exits fullscreen mode\n- `toggleFullScreen()`: toggles fullscreen mode\n- `slideToIndex(index)`: slides to a specific index\n- `getCurrentIndex()`: returns the current index\n\n\u003cbr /\u003e\n\n## 🤝 Contributing\n\nPull requests should be focused on a single issue. If you're unsure whether a change is useful or involves a major modification, please open an issue first.\n\n- Follow the eslint config\n- Comment your code\n\n\u003cbr /\u003e\n\n## 🛠️ Build the example locally\n\nRequires Node.js \u003e= 18.18\n\n```\ngit clone https://github.com/xiaolin/react-image-gallery.git\ncd react-image-gallery\nnpm install\nnpm start\n```\n\nThen open [`localhost:8001`](http://localhost:8001) in a browser.\n\n\u003cbr /\u003e\n\n## 📄 License\n\nMIT © [Xiao Lin](https://github.com/xiaolin)\n","funding_links":[],"categories":["UI Components","Uncategorized","JavaScript","Demos","\u003csummary\u003eUI Components\u003c/summary\u003e","Other Components","Table of Contents"],"sub_categories":["Photo / Image","Uncategorized","Image Libraries"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaolin%2Freact-image-gallery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxiaolin%2Freact-image-gallery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxiaolin%2Freact-image-gallery/lists"}