react-native-photo-browse
Here is a browser page for multiple local or remote photos.
It supports:
- Multiple photos.
- Local image or remote url.
- Delete item.
- Save item to local.
- Image for placeholder or fail load.
- Orientation supported.
Install
Install by Yarn:
yarn add react-native-photo-browse
Install by NPM:
npm install --save react-native-photo-browse
Usage
First import in the file:
import * as PhotoBrowser from 'react-native-photo-browse';
Then call method in function:
{ const options = // ...options ; PhotoBrowser;}
Options
Name | Description |
---|---|
images | Image urls array to show |
failImage | A placeholder image when image is invalid |
currentIndex | Initial index of image to show. Default is 0 |
loadingText | Loading tips |
onClose | Callback method when close |
supportedOrientations | Orientations supported for Modal |
successDownloadText | DownLoad and Save success tips |
cancelDownloadText | cancel DownLoad tips |
clickdButtonIcon | clickdButton element |
unClickdButtonIcon | unClickdButton element |
closeIcon | stop download element |
startDownload | to download picture |
Global Settings
You can change settings globally.
import PhotoBrowserPage from 'react-native-photo-browse'; PhotoBrowserPagedefaultPropsxxx = yyy;
xxx
is a key of options