1.0.7 • Published 5 years ago

react-native-gallery-image v1.0.7

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

React Native Gallery Image

PNG

Preview

Layout doesn't break on rotateSelecting imagesChanging props
GIFGIFGIF

installation

You can install this package with the following command:

yarn add react-native-gallery-image

or

npm install react-native-gallery-image

In the top level component add

import ReactNativeGalleryImage from 'react-native-gallery-image';

export default class App extends Component {

  render() {
    return (
      <ReactNativeGalleryImage
        shouldFit={true}
        imagesEachRow={2}
        selectionColor="blue"
        onSelect={(selectedImages) => console.log(selectedImages)}
        onImagePress={(pressedImage) => console.log(pressedImage)}
      />
    );
}
}

Props

PropsTypeNotesRequiredDefault
imagesArrayArray of images✔️
imagesEachRowNumberNumber of images needed in one row3
shouldFitBooleanif true then images will fit on line if extra space is left in rowfalse
selectionColorStringColor of border that will appear on image selection'blue'
onSelectfunctiona function, which will be called when image is selected, returns array of selected images
onImagePressfunctiona function, which will be called when individual image is pressed, returns pressed image

Example

Click here to download running example

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago