1.0.2 • Published 3 years ago

react-simplest-gallery v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

Simplest React Gallery

Use it in your React projects to display multiple images.

Screenshots

Screenshots

Installation

  npm install react-simplest-gallery --save

Usage

import { SimplestGallery } from 'react-simplest-gallery'

function App() {
 <SimplestGallery
        images={[
          "https://images.pexels.com/photos/10801724/pexels-photo-10801724.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",
          "https://images.pexels.com/photos/10220184/pexels-photo-10220184.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=650&w=940",
        ]}
        width={500}
        height={500}
        cover
        background="red"
        duration={1000}
      />
}

Props

PropTypeDescription
imagesArrayArray of the images that will be shown.
widthIntegerWidth of frame
heightIntegerHeight of frame
coverBooleanMake images fit in the main frame.
backgroundStringSet background color of the main frame. (It can be visible if cover is false.)
durationIntegerShow next image after duration milliseconds.
1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago