JSPM

react-imagallery

1.0.2
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • 0
    • Score
      100M100P100Q22978F
    • License GNU General Public License v3.0

    React image gallery component

    Package Exports

    • react-imagallery
    • react-imagallery/dist/cjs/index.js
    • react-imagallery/dist/esm/index.js

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-imagallery) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    react-imagallery

    React Imagallery is react component for displaying image gallery.

    imagallery

    Table of Contents

    Getting started

    Installation

    Imagallery can be installed using npm (with React 16.0.0 or later):

    npm i react-imagallery

    Example

    You can see basic example of displaying images here.

    Features

    • Fullscreen support
    • Thumbnail navigation
    • Swipe & drag gestures
    • Slideshow support
    • Responsive design
    • Customization

    Props

    • items: (ImgGalleryItem[], required)
      • original: (string, required): image source URL
      • thumbnail: (string, required): image thumbnail source URL
      • originalAlt: (string): image alt
      • thumbnailAlt: (string): image thumbnail alt
    • selected: (number): selected item index to be displayed
    • autoPlay: (boolean): whether slideshow should play automatically
    • slideInterval: (number): interval between slides when slideshow is played
    • swipeDistance: (number): swipe distance needed for changing selected image
    • infinite: (boolean): whether images should create infinite loop
    • showControls: (boolean): whether to show controls
    • showThumbnails: (boolean): whether to show image thumbnails
    • showArrows: (boolean): whether to show arrows for changing selected image
    • onClose: (() => void): called when close button is clicked