Skip to content

hecom-rn/react-native-photo-browse

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A browser page for multiple local or remote photos.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%