AmpImageSwitcher

An AMP-compatible image switcher with pinch and zoom.

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

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"

arrowsbool

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

controlsfalse

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
  • carouselWrap
  • thumbnails
  • thumbnailsWrap
  • thumbnail
  • thumbnailSelected
  • dot
  • dots
  • dotSelected
  • @global