New Compose Multiplatform components arrived on Composables UICheck it out →

Component in Material 3 Compose

DismissibleDrawerSheet

Common

Content inside of a dismissible navigation drawer.

Last updated:

Installation

dependencies {
   implementation("androidx.compose.material3:material3:1.3.0-beta04")
}

Overloads

@Composable
fun DismissibleDrawerSheet(
    modifier: Modifier = Modifier,
    drawerShape: Shape = RectangleShape,
    drawerContainerColor: Color = DrawerDefaults.standardContainerColor,
    drawerContentColor: Color = contentColorFor(drawerContainerColor),
    drawerTonalElevation: Dp = DrawerDefaults.DismissibleDrawerElevation,
    windowInsets: WindowInsets = DrawerDefaults.windowInsets,
    content: @Composable ColumnScope.() -> Unit
)

Parameters

namedescription
modifierthe [Modifier] to be applied to this drawer's content
drawerShapedefines the shape of this drawer's container
drawerContainerColorthe color used for the background of this drawer. Use [Color.Transparent] to have no color.
drawerContentColorthe preferred color for content inside this drawer. Defaults to either the matching content color for [drawerContainerColor], or to the current [LocalContentColor] if [drawerContainerColor] is not a color from the theme.
drawerTonalElevationwhen [drawerContainerColor] is [ColorScheme.surface], a translucent primary color overlay is applied on top of the container. A higher tonal elevation value will result in a darker color in light theme and lighter color in dark theme. See also: [Surface].
windowInsetsa window insets for the sheet.
contentcontent inside of a dismissible navigation drawer
@Composable
fun DismissibleDrawerSheet(
    drawerState: DrawerState,
    modifier: Modifier = Modifier,
    drawerShape: Shape = RectangleShape,
    drawerContainerColor: Color = DrawerDefaults.standardContainerColor,
    drawerContentColor: Color = contentColorFor(drawerContainerColor),
    drawerTonalElevation: Dp = DrawerDefaults.DismissibleDrawerElevation,
    windowInsets: WindowInsets = DrawerDefaults.windowInsets,
    content: @Composable ColumnScope.() -> Unit
)

Parameters

namedescription
drawerStatestate of the drawer
modifierthe [Modifier] to be applied to this drawer's content
drawerShapedefines the shape of this drawer's container
drawerContainerColorthe color used for the background of this drawer. Use [Color.Transparent] to have no color.
drawerContentColorthe preferred color for content inside this drawer. Defaults to either the matching content color for [drawerContainerColor], or to the current [LocalContentColor] if [drawerContainerColor] is not a color from the theme.
drawerTonalElevationwhen [drawerContainerColor] is [ColorScheme.surface], a translucent primary color overlay is applied on top of the container. A higher tonal elevation value will result in a darker color in light theme and lighter color in dark theme. See also: [Surface].
windowInsetsa window insets for the sheet.
contentcontent inside of a dismissible navigation drawer