Skip to content

SwipeableDrawer API

API reference docs for the React SwipeableDrawer component. Learn about the props, CSS, and other APIs of this exported module.

Demos

For examples and details on the usage of this React component, visit the component demo pages:

Import

import SwipeableDrawer from '@mui/material/SwipeableDrawer';
// or
import { SwipeableDrawer } from '@mui/material';
Learn about the difference by reading this guide on minimizing bundle size.

Props

Props of the Drawer component are also available.

onCloseRequired

onOpenRequired

allowSwipeInChildren

children

disableBackdropTransition

disableDiscovery

disableSwipeToOpen

hysteresis

minFlingVelocity

open

SwipeAreaProps

swipeAreaWidth

transitionDuration

The ref is forwarded to the root element.

Inheritance

While not explicitly documented above, the props of the Drawer component are also available in SwipeableDrawer. You can take advantage of this to target nested components.


CSS

The following class names are useful for styling with CSS (the state classes are marked).
To learn more, visit the component customization page.

.MuiSwipeableDrawer-root

.MuiSwipeableDrawer-docked

.MuiSwipeableDrawer-paper

.MuiSwipeableDrawer-paperAnchorLeft

.MuiSwipeableDrawer-paperAnchorRight

.MuiSwipeableDrawer-paperAnchorTop

.MuiSwipeableDrawer-paperAnchorBottom

.MuiSwipeableDrawer-paperAnchorDockedLeft

.MuiSwipeableDrawer-paperAnchorDockedTop

.MuiSwipeableDrawer-paperAnchorDockedRight

.MuiSwipeableDrawer-paperAnchorDockedBottom

.MuiSwipeableDrawer-modal


You can override the style of the component using one of these customization options: