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

← Back to Material Compose

BottomDrawer

Component
in
Material
. Since 1.0.0

Overview

Code Examples

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

Bottom navigation drawers are modal drawers that are anchored to the bottom of the screen instead of the left or right edge. They are only used with bottom app bars.

!Bottom drawer image(https://developer.android.com/images/reference/androidx/compose/material/bottom-drawer.png)

See ModalDrawer for a layout that introduces a classic from-the-side drawer.

Overloads

BottomDrawer

@Composable
@ExperimentalMaterialApi
fun BottomDrawer(
    drawerContent: @Composable ColumnScope.() -> Unit,
    modifier: Modifier = Modifier,
    drawerState: BottomDrawerState = rememberBottomDrawerState(Closed),
    gesturesEnabled: Boolean = true,
    drawerShape: Shape = MaterialTheme.shapes.large,
    drawerElevation: Dp = DrawerDefaults.Elevation,
    drawerBackgroundColor: Color = MaterialTheme.colors.surface,
    drawerContentColor: Color = contentColorFor(drawerBackgroundColor),
    scrimColor: Color = DrawerDefaults.scrimColor,
    content: @Composable () -> Unit
)

Parameters

NameDescription
drawerStatestate of the drawer
modifieroptional Modifier for the entire component
gesturesEnabledwhether or not drawer can be interacted by gestures
drawerShapeshape of the drawer sheet
drawerElevationdrawer sheet elevation. This controls the size of the shadow below the drawer sheet
drawerContentcomposable that represents content inside the drawer
drawerBackgroundColorbackground color to be used for the drawer sheet
drawerContentColorcolor of the content to use inside the drawer sheet. Defaults to either the matching content color for drawerBackgroundColor, or, if it is not a color from the theme, this will keep the same value set above this Surface.
scrimColorcolor of the scrim that obscures content when the drawer is open. If the color passed is Color.Unspecified, then a scrim will no longer be applied and the bottom drawer will not block interaction with the rest of the screen when visible.
contentcontent of the rest of the U