Beta

Image Zoom

Image zoom with detect touch event.

this component uses inner-image-zoom library, for more references visit the library docs.

Installation

Usage

<ImageZoom
  src={'/path/to/main-image.png'}
  zoomSrc={'/path/to/zoom-image.png'}
/>

Props

PropTypeDefault
src
array
-
sources?
array
-
hasSpacer?
boolean
true
zoomSrc?
string
-
zoomScale?
number
1
zoomPreload?
boolean
true
moveType?
pan | darg
pan
zoomType?
click | hover
hover
fadeDuration?
number
150
fullscreenOnMobile?
boolean
false
mobileBreakpoint?
number
640
hideCloseButton?
boolean
false
hideHint?
boolean
false
afterZoomIn?
() => void
-
afterZoomOut?
() => void
-

Sources

PropTypeDefault
type?
string
-
media?
string
-
sizes?
string
-
srcSet?
string
-