react-native-photo-browse

1.3.0 • Public • Published

react-native-photo-browse

npm version Build Status

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:

func = () => {
  const options = {
    // ...options
  };
  PhotoBrowser.showPhotoBrowserPage(options);
}

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';
 
PhotoBrowserPage.defaultProps.xxx = yyy;

xxx is a key of options

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-photo-browse

Weekly Downloads

0

Version

1.3.0

License

MIT

Unpacked Size

15.4 kB

Total Files

6

Last publish

Collaborators

  • smartshallot