Skip to content

flyfloor/react-touch-gallery

Repository files navigation

react-touch-gallery

Demo

open http://braavos.me/react-touch-gallery in mobile browser and see results

Install

npm install react-touch-gallery --save

Usage

import Gallery from 'react-touch-gallery'
import style from 'react-touch-gallery/css/gallery.less'
<Gallery urls={urls}/>

props

urls image urls
showRange show current page / total page
showArrow show navigation arrow
showCloseBtn show close button
prevArrow custom previous arrow node
nextArrow custom next arrow node
events:
onChange(index) preview image change event
onEnd(index) at last page, still go right
onStart(index) at first page, still go left
current initial active index page