AmpForm

An AMP-compatible form. When not rendering AMP content, this component renders a simple div. This component will automatically cover itself with a modal loading spinner when submitting.

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

Props

NameTypeDefaultDescription
idstring

The id for the amp-form element. If left blank a unique id will automatically be generated.

targetstring'_top'

The form's action attribute. Defaults to "_top".

methodenum : 'get' |
'post'
'get'

The HTTP method to use. Defaults to "get".

maskbooltrue

Set to false to not show the mask when submitting. Defaults to true.

CSS API

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

  • mask