0.2.41 • Published 4 years ago

@kurpachsv/react-gallery v0.2.41

Weekly downloads
5
License
MIT
Repository
github
Last release
4 years ago

npm version Build Status Coverage Status Maintainability Dependency Status npm bundle size (minified) npm bundle size (minified + gzip)

react-gallery

A simple, fast and flexible image gallery.

Preview

See storybook for live demonstration.

Basic Usage

npm i --save @kurpachsv/react-gallery
import {Gallery} from '@kurpachsv/react-gallery';
class App extends Component {
    
    render() {
        return (
            <Gallery
                images={
                    // your images array
                }
            />
        );
    }
}

For image must be specify width, height and src attributes.

Properties

PropertyTypeDefaultDescription
imagesarrayundefinedrequired; array of images
columnsMaxCountnumber5optional; max value of columns count
columnMaxHeightnumber200optional; max column height in px (for prevent pictures degradation, if last row is not filled)
gutterInPercentnumber0.5optional; value in % of space between images
imageRendererfunctiondefault implementationoptional; component/function for render of image
enableMasonryboolfalseoptional; turn on/off masonry layout mode
disableObserverboolfalseoptional; turn on/off lazy loading and intersection observer for images
disableActualImageboolfalseoptional; show/hide actual images, but not the placeholders
classNamestring''optional; container class name
columnClassNamestring''optional; item class name
rowClassNamestring''optional; row class name (for default layout)
enableFixedboolfalseoptional; turn on/off fixed layout mode
fixedBottomnumber50optional; size in px of bottom margin
enableDetailViewboolfalseoptional; turn on/off detail view mode for fixed or masonry layout
detailsViewRendererfunctiondefault implementationoptional; component/function for render of detail view

Renderers

For better flexibility, you can override default image renderer or details renderer, here is a default implementation this renderers.

License

MIT license

Copyright (c) Sergei Kurpach, 2019

0.2.41

4 years ago

0.2.40

4 years ago

0.2.39

5 years ago

0.2.38

5 years ago

0.2.37

5 years ago

0.2.36

5 years ago

0.2.35

5 years ago

0.2.34

5 years ago

0.2.33

5 years ago

0.2.32

5 years ago

0.2.31

5 years ago

0.2.30

5 years ago

0.2.29

5 years ago

0.2.28

5 years ago

0.2.27

5 years ago

0.2.26

5 years ago

0.2.25

5 years ago

0.2.24

5 years ago

0.2.23

5 years ago

0.2.22

5 years ago

0.2.21

5 years ago

0.2.20

5 years ago

0.2.19

5 years ago

0.2.18

5 years ago

0.2.17

5 years ago

0.2.16

5 years ago

0.2.15

5 years ago

0.2.14

5 years ago

0.2.13

5 years ago

0.2.12

5 years ago

0.2.11

5 years ago

0.2.10

5 years ago

0.2.9

5 years ago

0.2.8

5 years ago

0.2.6

5 years ago

0.2.5

5 years ago

0.2.4

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.0

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago