Drawer

Import
import Drawer from 'react-storefront/Drawer'

Props

NameTypeDefaultDescription
showCloseButtonbooltrue

Set to false to hide the close button. Defaults to true

onRequestClosefunc

Called when the user closes the drawer

titleunion : string |
element

The title to display at the top of the drawer

autoAdjustBodyPaddingboolfalse

Set to true to automatically add padding to the body when the drawer is open so that the user is able to scroll and see all of the body content. Defaults to false.

closeButtonPropsobject{}

Props to apply to the closeButton

ampBindClosedstring

The name of a property the amp-state to bind to the closed state of the drawer.

CSS API

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

  • closeButton
  • paper
  • title
  • ampClosed