Awesome Gallery Component For React Native

An awesome gallery component for React Native, based on Reanimated v2.

How to use it:

1. Install and import the component.

# Yarn
$ yarn add react-native-awesome-gallery

# NPM
$ npm i react-native-awesome-gallery
import Gallery from 'react-native-awesome-gallery';

2. Add a basic gallery to the app.

const images = ['1.jpg', '2.jpg', '3.jpg'];
return (
  <Gallery
    images={images}
    onIndexChange={(newIndex) => {
      console.log(newIndex);
    }}
  />
);

3. All available component props.

images: string[];
renderImage?: Props['renderImage'];
initialIndex?: number;
onIndexChange?: (index: number) => void;
numToRender?: number;
emptySpaceWidth?: number;
doubleTapScale?: number;
maxScale?: number;
style?: ViewStyle;

Preview:

Awesome Gallery Component For React Native

Download Details:

Author: Flair-Dev

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/Flair-Dev/react-native-awesome-gallery

License: MIT

You Might Be Interested In:

Add Comment