All Projects → halilb → React Native Photo Browser

halilb / React Native Photo Browser

Licence: mit
Local and remote media gallery with captions, selections and grid view support for react native.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Photo Browser

Zlphotobrowser
Wechat-like image picker. Support select normal photos, videos, gif and livePhoto. Support edit image and crop video. 微信样式的图片选择器,支持预览/相册内拍照及录视频、拖拽/滑动选择,编辑图片/视频,支持多语言国际化等功能;
Stars: ✭ 3,962 (+493.11%)
Mutual labels:  photos
Fmphotopicker
A modern, simple and zero-dependency photo picker with an elegant and customizable image editor
Stars: ✭ 428 (-35.93%)
Mutual labels:  photos
Thumbsup
Generate static HTML photo / video galleries
Stars: ✭ 493 (-26.2%)
Mutual labels:  photos
Resplash
Unofficial Unsplash Android App
Stars: ✭ 395 (-40.87%)
Mutual labels:  photos
Android Multipicker Library
Android Multipicker Library
Stars: ✭ 425 (-36.38%)
Mutual labels:  photos
Splash Cli
A simple, command line tool to download Unsplash wallpapers. It’s not intended to be anything particularly fancy — it just works.
Stars: ✭ 432 (-35.33%)
Mutual labels:  photos
Unsplash Php
👻 Official PHP wrapper for the Unsplash API
Stars: ✭ 332 (-50.3%)
Mutual labels:  photos
Filmulator Gui
Filmulator --- Simplified raw editing with the power of film
Stars: ✭ 522 (-21.86%)
Mutual labels:  photos
Hoverzoom
Google Chrome extension for zooming images on mouse hover
Stars: ✭ 426 (-36.23%)
Mutual labels:  photos
Nanogallery2
a modern photo / video gallery and lightbox [JS library]
Stars: ✭ 488 (-26.95%)
Mutual labels:  photos
Zing Gallery
基于node.js的web相册,让摄影照片的展示更加简单 Web albums based on node.js, more simple to show photography photos
Stars: ✭ 401 (-39.97%)
Mutual labels:  photos
Alassetslibrary Customphotoalbum
A nice ALAssetsLibrary category for saving images & videos into custom photo album.
Stars: ✭ 413 (-38.17%)
Mutual labels:  photos
Bubblepictures
Bubble Pictures for iOS done in Swift
Stars: ✭ 434 (-35.03%)
Mutual labels:  photos
Multiimagepicker
A library to pick multi images in Android
Stars: ✭ 391 (-41.47%)
Mutual labels:  photos
React Viewer
react image viewer, supports rotation, scale, zoom and so on
Stars: ✭ 502 (-24.85%)
Mutual labels:  photos
Natural Language Image Search
Search photos on Unsplash using natural language
Stars: ✭ 359 (-46.26%)
Mutual labels:  photos
Imagestore
Open source google photos alternative!
Stars: ✭ 429 (-35.78%)
Mutual labels:  photos
React Grid Gallery
Justified image gallery component for React
Stars: ✭ 571 (-14.52%)
Mutual labels:  photos
Simple Camera
Quick photo and video camera with a flash, customizable resolution and no ads.
Stars: ✭ 503 (-24.7%)
Mutual labels:  photos
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (-30.09%)
Mutual labels:  photos

React Native Photo Browser

Information

A full screen image gallery with captions, selections and grid view support for react-native. Layout and API design are inspired by great MWPhotoBrowser library.

The component has both iOS and Android support.

Installation

npm install react-native-photo-browser --save

Properties

Prop Type Description Default
style Style Overrides default container style. null
mediaList Array<Media> List of media objects to display. []
initialIndex Number Sets the visible photo initially. 0
alwaysShowControls Boolean Allows to control whether the bars and controls are always visible or whether they fade away to show the photo full. false
displayActionButton Boolean Show action button to allow sharing, copying, etc. false
displayNavArrows Boolean Whether to display left and right nav arrows on bottom toolbar. false
alwaysDisplayStatusBar Boolean Whether to display the OS Status Bar. false
displayTopBar Boolean Whether to display top bar. true
enableGrid Boolean Whether to allow the viewing of all the photo thumbnails on a grid. true
startOnGrid Boolean Whether to start on the grid of thumbnails instead of the first photo. false
displaySelectionButtons Boolean Whether selection buttons are shown on each image. false
useCircleProgressiOS Boolean Displays Progress.Circle instead of default Progress.Bar for full screen photos. Check Progress section for more info. false
onSelectionChanged Function Called when a media item is selected or unselected. (media, index, isSelected) => {}
onActionButton Function Called when action button is pressed for a photo. Your application should handle sharing process, please see Sharing section for more information. If you don't provide this method, action button tap event will simply be ignored. (media, index) => {}
onBack Function Called when back button is tapped. () => {}
itemPerRow Number Sets images amount in grid row. 3
onPhotoLongPress Function Called when a long press trigged on a photo. () => {}
delayPhotoLongPress Number The long press delay in ms. 1000
square Boolean Displays the thumbnails as squares(same width, height). false
gridOffset Number Offset the width of the grid from the screen width. 0
customTitle Function Custom title in full screen mode. (index, rowCount) => { return '' }
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

Media Object

const media = {
  thumb: '', // thumbnail version of the photo to be displayed in grid view. actual photo is used if thumb is not provided
  photo: '', // a remote photo or local media url
  id: 1, // unique identifer for the photo; can be omitted if the `thumb`/`photo` will always be unique
  caption: '', // photo caption to be displayed
  selected: true, // set the photo selected initially(default is false)
};

Progress Component

Android

Built-in ActivityIndicator component is used for Android. Any additional configuration is not needed.

iOS

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 and React Native documentation.

Sharing

I 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 and react-native-share.

Examples

See PhotoBrowserExample.js file.

Follow those steps to run the example:

  1. Clone the repo git clone https://github.com/halilb/react-native-photo-browser && cd react-native-photo-browser/Example
  2. Install dependencies npm install
  3. Follow official instructions to run the example project in a simulator or device.

Roadmap

  • [x] Android support
  • [ ] Improve performance for bigger collections
  • [ ] Video support
  • [ ] Photo zoom
  • [ ] Zooming photos to fill the screen

Licence

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].