androidx.compose.material3

DismissibleDrawerSheet

Composable function

A part of ModalNavigationDrawer. See that page for an overview and examples.

Basic

The sheet does not follow the drawer state.

@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,
)

drawerShape: ShapeOptional

Default: RectangleShape

Sets the outline of the sheet.

drawerContainerColor: ColorOptional

Default: DrawerDefaults.standardContainerColor

The background color of the sheet.

drawerContentColor: ColorOptional

Default: contentColorFor(drawerContainerColor)

The default color for text and icons in the sheet.

drawerTonalElevation: DpOptional

Default: DrawerDefaults.DismissibleDrawerElevation

Tints the sheet a little toward the primary color.

windowInsets: WindowInsetsOptional

Default: DrawerDefaults.windowInsets

Space kept free for system bars inside the sheet.

content: @Composable ColumnScope.() -> UnitRequired

The screen behind the drawer. For a sheet, the items inside it, placed in a Column.

Same as in ModalNavigationDrawer: modifier.

With drawer state

Takes drawerState, for predictive back on Android.

@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,
)

Same as in ModalNavigationDrawer: drawerState, modifier.

Same as above: drawerShape, drawerContainerColor, drawerContentColor, drawerTonalElevation, windowInsets, content.

Drawer types and parts