{"id":3998,"url":"https://github.com/halilb/react-native-photo-browser","last_synced_at":"2025-08-04T00:31:02.120Z","repository":{"id":8281621,"uuid":"56848223","full_name":"halilb/react-native-photo-browser","owner":"halilb","description":"Local and remote media gallery with captions, selections and grid view support for react native.","archived":true,"fork":false,"pushed_at":"2022-12-03T03:15:13.000Z","size":2989,"stargazers_count":723,"open_issues_count":29,"forks_count":184,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-08-02T16:26:10.455Z","etag":null,"topics":["photos","react-native"],"latest_commit_sha":null,"homepage":"","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/halilb.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}},"created_at":"2016-04-22T10:40:57.000Z","updated_at":"2025-04-19T05:21:32.000Z","dependencies_parsed_at":"2022-08-07T07:15:10.060Z","dependency_job_id":null,"html_url":"https://github.com/halilb/react-native-photo-browser","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/halilb/react-native-photo-browser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilb%2Freact-native-photo-browser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilb%2Freact-native-photo-browser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilb%2Freact-native-photo-browser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilb%2Freact-native-photo-browser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halilb","download_url":"https://codeload.github.com/halilb/react-native-photo-browser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halilb%2Freact-native-photo-browser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268633424,"owners_count":24281780,"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-08-03T02:00:12.545Z","response_time":2577,"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":["photos","react-native"],"created_at":"2024-01-05T20:16:58.042Z","updated_at":"2025-08-04T00:31:01.699Z","avatar_url":"https://github.com/halilb.png","language":"JavaScript","funding_links":[],"categories":["Components","Others"],"sub_categories":["UI"],"readme":"# React Native Photo Browser\n\n### Information\nA full screen image gallery with captions, selections and grid view support for react-native. Layout and API design are inspired by great [MWPhotoBrowser](https://github.com/mwaterfall/MWPhotoBrowser) library.\n\nThe component has both iOS and Android support.\n\n![](screenshots/photo-browser.gif)\n\n![](screenshots/screenshot-1.png)\n![](screenshots/screenshot-2.png)\n\n### Installation \n```npm install react-native-photo-browser --save```\n\n### Properties\n\n| Prop | Type | Description | Default |\n|---|---|---|---|\n|**`style`**|Style|Overrides default container style.|`null`|\n|**`mediaList`**|Array\\\u003cMedia\\\u003e|List of [media objects](#media-object) to display.|`[]`|\n|**`initialIndex`**|Number|Sets the visible photo initially.|`0`|\n|**`alwaysShowControls`**|Boolean|Allows to control whether the bars and controls are always visible or whether they fade away to show the photo full.|`false`|\n|**`displayActionButton`**|Boolean|Show action button to allow sharing, copying, etc.|`false`|\n|**`displayNavArrows`**|Boolean|Whether to display left and right nav arrows on bottom toolbar.|`false`|\n|**`alwaysDisplayStatusBar`**|Boolean|Whether to display the OS Status Bar.|`false`|\n|**`displayTopBar`**|Boolean|Whether to display top bar.|`true`|\n|**`enableGrid`**|Boolean|Whether to allow the viewing of all the photo thumbnails on a grid.|`true`|\n|**`startOnGrid`**|Boolean|Whether to start on the grid of thumbnails instead of the first photo.|`false`|\n|**`displaySelectionButtons`**|Boolean|Whether selection buttons are shown on each image.|`false`|\n|**`useCircleProgress`**_iOS_|Boolean|Displays Progress.Circle instead of default Progress.Bar for full screen photos. Check [Progress](#progress-component) section for more info.|`false`|\n|**`onSelectionChanged`**|Function|Called when a media item is selected or unselected.|`(media, index, isSelected) =\u003e {}`|\n|**`onActionButton`**|Function|Called when action button is pressed for a photo. Your application should handle sharing process, please see [Sharing](#sharing) section for more information. If you don't provide this method, action button tap event will simply be ignored.|`(media, index) =\u003e {}`|\n|**`onBack`**|Function|Called when back button is tapped.|`() =\u003e {}`|\n|**`backIcon`**|ImageSourcePropType|Back button icon|`require('../Assets/angle-left.png')`|\n|**`backElement`**|ReactNode|Back button icon|`\u003cMyBackIcon /\u003e`|\n|**`backTitle`**|String \u0026#124; null|Back button title|`Back`|\n|**`itemPerRow`**|Number|Sets images amount in grid row.|`3`|\n|**`onPhotoLongPress`**|Function|Called when a long press trigged on a photo.|`() =\u003e {}`|\n|**`delayPhotoLongPress`**|Number|The long press delay in `ms`.|`1000`|\n|**`square`**|Boolean|Displays the thumbnails as squares(same width, height).|`false`|\n|**`gridOffset`**|Number|Offset the width of the grid from the screen width.|`0`|\n|**`customTitle`**|Function|Custom title in full screen mode.|`(index, rowCount) =\u003e { return '' }`|\n|**`customBottomBarButton`**|Component|Use a custom component in the bottom bar to the left of the Share button. The visibility of the Share button can still be controlled with `displayActionButton`.|`null`|\n\n### Media Object\n\n```js\nconst media = {\n  thumb: '', // thumbnail version of the photo to be displayed in grid view. actual photo is used if thumb is not provided\n  photo: '', // a remote photo or local media url\n  id: 1, // unique identifer for the photo; can be omitted if the `thumb`/`photo` will always be unique\n  caption: '', // photo caption to be displayed\n  selected: true, // set the photo selected initially(default is false)\n};\n```\n\n\n### Progress Component\n\n#### Android\n\nBuilt-in [ActivityIndicator](https://facebook.github.io/react-native/docs/activityindicator.html) component is used for Android. Any additional configuration is not needed.\n\n#### iOS\n\n[react-native-progress](https://github.com/oblador/react-native-progress) component is used as progress indicator. The default progress component is `Progress.Bar`. You can also use `Progress.Circle` component by simply using `useCircleProgress` prop, and adding `ReactART` library to your Xcode project. For more information please check out [react-native-progress repo](https://github.com/oblador/react-native-progress#reactart-based-components) and [React Native documentation](http://facebook.github.io/react-native/docs/linking-libraries-ios.html#content).\n\n### Sharing\n\nI tried delivering sharing photo feature but it was complicated to provide for iOS and android out of the box. I now believe it's a better idea to separate sharing logic into another module. Please check out Example project to see a basic ActionSheetIOS implementation for iOS. You may also use available sharing libraries such as [react-native-activity-view](https://github.com/naoufal/react-native-activity-view) and [react-native-share](https://github.com/EstebanFuentealba/react-native-share).\n\n### Examples\n\nSee [PhotoBrowserExample.js](Example/PhotoBrowserExample.js) file.\n\nFollow those steps to run the example:\n\n1. Clone the repo `git clone https://github.com/halilb/react-native-photo-browser \u0026\u0026 cd react-native-photo-browser/Example`\n2. Install dependencies `npm install`\n3. Follow [official instructions](https://facebook.github.io/react-native/docs/getting-started.html) to run the example project in a simulator or device.\n\n### Roadmap\n- [x] Android support\n- [ ] Improve performance for bigger collections\n- [ ] Video support\n- [ ] Photo zoom\n- [ ] Zooming photos to fill the screen\n\n### Licence\n[MIT](http://opensource.org/licenses/mit-license.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalilb%2Freact-native-photo-browser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalilb%2Freact-native-photo-browser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalilb%2Freact-native-photo-browser/lists"}