Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 2.74 KB

swipeable-drawer.md

File metadata and controls

37 lines (24 loc) · 2.74 KB
filename title
/packages/material-ui/src/SwipeableDrawer/SwipeableDrawer.js
SwipeableDrawer API

SwipeableDrawer

The API documentation of the SwipeableDrawer React component.

Props

Name Type Default Description
disableBackdropTransition bool false Disable the backdrop transition. This can improve the FPS on low-end devices.
disableDiscovery bool false If true, touching the screen near the edge of the drawer will not slide in the drawer a bit to promote accidental discovery of the swipe gesture.
disableSwipeToOpen bool typeof navigator !== 'undefined' && /iPad|iPhone|iPod/.test(navigator.userAgent) If true, swipe to open is disabled. This is useful in browsers where swiping triggers navigation actions. Swipe to open is disabled on iOS browsers by default.
onClose * func   Callback fired when the component requests to be closed.

Signature:
function(event: object) => void
event: The event source of the callback
onOpen * func   Callback fired when the component requests to be opened.

Signature:
function(event: object) => void
event: The event source of the callback
open * bool   If true, the drawer is open.
swipeAreaWidth number 20 The width of the left most (or right most) area in pixels where the drawer can be swiped open from.
transitionDuration union: number |
 { enter?: number, exit?: number }
{ enter: duration.enteringScreen, exit: duration.leavingScreen } The duration for the transition, in milliseconds. You may specify a single timeout for all transitions, or individually with an object.

Any other properties supplied will be spread to the root element (Drawer).

Inheritance

The properties of the Drawer component are also available. You can take advantage of this behavior to target nested components.

Demos