← Back to Material Compose
BottomDrawerLayout
Component
in
Material
. Since 0.1.0-dev15Overview
Code Examples
Navigation drawers provide access to destinations in your app.
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.
These drawers open upon tapping the navigation menu icon in the bottom app bar. They are only for use on mobile.
See ModalDrawerLayout for a layout that introduces a classic from-the-side drawer.
Overloads
BottomDrawerLayout
@Composable
@ExperimentalMaterialApi
fun BottomDrawerLayout(
drawerContent: @Composable ColumnScope.() -> Unit,
modifier: Modifier = Modifier,
drawerState: BottomDrawerState = rememberBottomDrawerState(BottomDrawerValue.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,
bodyContent: @Composable () -> Unit
)
Parameters
Name | Description |
---|---|
drawerState | state of the drawer |
modifier | optional modifier for the drawer |
gesturesEnabled | whether or not drawer can be interacted by gestures |
drawerShape | shape of the drawer sheet |
drawerElevation | drawer sheet elevation. This controls the size of the shadow below the drawer sheet |
drawerContent | composable that represents content inside the drawer |
drawerBackgroundColor | background color to be used for the drawer sheet |
drawerContentColor | color 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. |
scrimColor | color of the scrim that obscures content when the drawer is open |
bodyContent | content of the rest of the UI @throws IllegalStateException when parent has Float.POSITIVE_INFINITY heigh |