React Storefront
|

AmpImageSwitcher

import AmpImageSwitcher from 'react-storefront/amp/AmpImageSwitcher'

An AMP-compatible image switcher with pinch and zoom.

Props

NameTypeDefaultDescription
typeenum : 'slides' |
'carousel'
'slides'

The amp-carousel type. Can be "slides" or "carousel". Defaults to "slides".

indicatorsboolfalse

Set to true to display dots indicated which image in the series is selected. Defaults to false

ampStatePropertystring'selectedImage'

The property in the amp state to bind to. Defaults to "selectedImage"

arrowsboolfalse

Set to true to display left and right arrows. Defaults to false

CSS API

You can override all the class names injected by Moov-PWA thanks to the classes property. This property accepts the following keys:

  • root
  • rootImportant
  • carouselWrap
  • thumbnails
  • thumbnailsWrap
  • thumbnail
  • thumbnailSelected
  • thumbnailSelectedLine
  • dot
  • dots
  • dotSelected
  • hidden
  • @global