State of Compose 2023 results are in! Click here to learn more

← Back to Material 3 Compose

DismissibleNavigationDrawer

Component
in
Material 3
. Since 1.0.0

Overview

Code Examples

Video

<a href="https://m3.material.io/components/navigation-drawer/overview" class="external" target="_blank">Material Design navigation drawer</a>.

Navigation drawers provide ergonomic access to destinations in an app. They’re often next to app content and affect the screen’s layout grid.

!Navigation drawer image(https://developer.android.com/images/reference/androidx/compose/material3/navigation-drawer.png)

Dismissible standard drawers can be used for layouts that prioritize content (such as a photo gallery) or for apps where users are unlikely to switch destinations often. They should use a visible navigation menu icon to open and close the drawer.

Overloads

DismissibleNavigationDrawer

@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun DismissibleNavigationDrawer(
    drawerContent: @Composable () -> Unit,
    modifier: Modifier = Modifier,
    drawerState: DrawerState = rememberDrawerState(DrawerValue.Closed),
    gesturesEnabled: Boolean = true,
    content: @Composable () -> Unit
)

Parameters

NameDescription
drawerContentcontent inside this drawer
modifierthe Modifier to be applied to this drawer
drawerStatestate of the drawer
gesturesEnabledwhether or not the drawer can be interacted by gestures
contentcontent of the rest of the U