Giter Club home page Giter Club logo

react-native-gallery-view's Introduction

Welcome to react-native-gallery-view ๐Ÿ‘‹

Version Documentation Maintenance

Gallery View for Images in React Native for both IOS and Android


๐Ÿ  Homepage

Install

npm install react-native-gallery-view

Usage

import React, { useState } from 'react';
import { SafeAreaView, ScrollView, Text } from 'react-native';
import { Gallery } from 'react-native-gallery-view';

export default App = ({ navigation, route, navigator }) => {
  const [images, setImages] = useState([{
    src: "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQRpGmKrfBFE90_MyomlXre9OJhLyjMvfGm5w&usqp=CAU",
    id: "12345"
  }, {
    src: "https://st.depositphotos.com/1007995/1274/i/600/depositphotos_12746726-stock-photo-fashion-man-wearing- sunglasses-thinking.jpg",
    id: "12346"
  }, {
    src: "https://i.pinimg.com/736x/36/fc/e9/36fce9ed325c3303d858b01257bd76c3.jpg",
    id: "12347"
  }]);

  return (
    <SafeAreaView
      style={{
        flex: 1
      }}
      
    >
      <ScrollView
        style={{
          flex: 1,
        }}
        showsVerticalScrollIndicator={false}
     >
        {/* Basic Usage */}
        <Text
          style={{
            fontSize: 20,
            textAlign: "center",
            marginVertical: 20
          }}
        >
          Basic Usage for React Native Gallery View
        </Text>
        <Gallery
          images={images}
          activeIndex={0}
          navigator={navigator}
        />

        {/* Basic Usage */}
        <Text
          style={{
            fontSize: 20,
            textAlign: "center",
            marginVertical: 20
          }}
        >
          Customized usage of React Native Gallery View
        </Text>
        <Gallery
          thumbnailImageStyles={{
            height: 100,
            width: 100,
            borderRadius: 15,
          }}
          mainImageStyle={{
            height: 200,
          }}
          loaderColor="yellow"
          borderColor="orange"
          images={images}
          activeIndex={0}
          navigator={navigator}
          noImageFoundText={"No Image found custom text"}
        />
      </ScrollView>
    </SafeAreaView>
  )
}

Demo

react-native-gallery-view.demo.mp4

list of available props for customization SliderBox:

Props Value Type Description
loaderColor String Eg. "#000000" Color for Lazy Loader in Main Image. default color is black
borderColor String Eg. "red" border color for the active Thumbnail Image. Default is red
thumbnailImageStyles Object Eg. {height: 80 , width : 80} Styling for the thumbnail images
mainImageStyle Object Eg. {height: 250 , width : "90%"} Styling for the Main image
noImageFoundText String Eg. "No Images found" Custom Text for Empty Images

Author

๐Ÿ‘ค Hari Karthyk ([email protected])

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a โญ๏ธ if this project helped you!

๐Ÿ“ License

Copyright ยฉ 2021 Hari Karthyk ([email protected]).
This project is ISC licensed.

react-native-gallery-view's People

Contributors

harikarthyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.