Drawer
Navigation drawers provide ergonomic access to destinations in an app. They can either be permanently on-screen or controlled by a navigation menu icon.Temporary Drawer
Temporary navigation drawers can toggle open or closed. They are elevated above other content and overlay the page.Drawer Anchors
The drawer can appear from any side of the screen.Persistent Drawer
Persistent navigation drawers can toggle open or closed. The drawer sits on the same surface elevation as the content and shares the same layout.Permanent Drawer
Permanent navigation drawers are always visible and pinned to the left edge.Responsive Drawer
Combine variants for responsive behavior.Clipped Under App Bar
Position the drawer below the app bar.Props
anchor
- Type:
'left' | 'top' | 'right' | 'bottom' - Default:
'left' - Description: Side from which the drawer will appear
open
- Type:
boolean - Default:
false - Description: If
true, the component is shown
onClose
- Type:
(event: object, reason: string) => void - Description: Callback fired when the component requests to be closed. The
reasonparameter can be:"escapeKeyDown","backdropClick"
variant
- Type:
'permanent' | 'persistent' | 'temporary' - Default:
'temporary' - Description: The variant to use
- temporary: Modal drawer that overlays content
- persistent: Drawer that can be toggled and pushes content
- permanent: Always visible drawer
elevation
- Type:
number - Default:
16 - Description: The elevation of the drawer
hideBackdrop
- Type:
boolean - Default:
false - Description: If
true, the backdrop is not rendered
ModalProps
- Type:
Partial<ModalProps> - Default:
{} - Description: Props applied to the Modal element (when
variant="temporary")
transitionDuration
- Type:
TransitionProps['timeout'] - Default:
{ enter: theme.transitions.duration.enteringScreen, exit: theme.transitions.duration.leavingScreen } - Description: The duration for the transition, in milliseconds
slots
- Type:
{ root?: React.ElementType, backdrop?: React.ElementType, docked?: React.ElementType, paper?: React.ElementType, transition?: React.ElementType } - Description: The components used for each slot inside the drawer
slotProps
- Type:
{ root?: object, backdrop?: object, docked?: object, paper?: object, transition?: object } - Description: The props used for each slot inside the drawer
sx
- Type:
SxProps<Theme> - Description: System prop for defining CSS styles
Accessibility
- Temporary drawers are rendered as modal dialogs with
role="dialog"andaria-modal="true" - The drawer content should be keyboard navigable
- Pressing Escape closes temporary and persistent drawers
- Clicking the backdrop closes temporary drawers