StylishModalNavigationDrawer

fun StylishModalNavigationDrawer(drawerContent: @Composable ColumnScope.() -> Unit, modifier: Modifier = Modifier, drawerState: DrawerState = rememberDrawerState(DrawerValue.Closed), gesturesEnabled: Boolean = true, shape: Shape = DrawerDefaults.shape, containerColor: Color = DrawerDefaults.modalContainerColor, contentColor: Color = contentColorFor(containerColor), tonalElevation: Dp = DrawerDefaults.ModalDrawerElevation, windowInsets: WindowInsets = DrawerDefaults.windowInsets, scrimColor: Color = DrawerDefaults.scrimColor, content: @Composable () -> Unit)

A modal navigation drawer with Stylish theme defaults, wrapping the Material 3 ModalNavigationDrawer.

The drawer overlays the content and dims it with scrimColor while open; tapping the scrim, swiping, or pressing back dismisses it. drawerContent is placed inside a ModalDrawerSheet so it inherits the Stylish container colors, shape, elevation, and window insets without any extra setup.

Parameters

drawerContent

The drawer content, typically a list of NavigationDrawerItems, laid out inside the sheet's ColumnScope.

modifier

Modifier applied to the ModalNavigationDrawer root.

drawerState

State of the drawer, controlling open/closed position. Defaults to rememberDrawerState starting DrawerValue.Closed.

gesturesEnabled

When false, swipe gestures do not open or close the drawer. Defaults to true.

shape

Corner shape of the drawer sheet. Defaults to DrawerDefaults.shape (the Material 3 drawer shape).

containerColor

Background color of the drawer sheet. Defaults to DrawerDefaults.modalContainerColor (surfaceContainerLow), the Material 3 modal drawer spec value.

contentColor

Default content color of the drawer sheet. Defaults to contentColorFor of containerColor.

tonalElevation

Tonal elevation of the drawer sheet. Defaults to DrawerDefaults.ModalDrawerElevation.

windowInsets

WindowInsets consumed by the drawer sheet. Defaults to DrawerDefaults.windowInsets.

scrimColor

Color of the scrim that obscures the content while the drawer is open. Defaults to DrawerDefaults.scrimColor.

content

The page content behind the drawer, typically the main screen scaffold.

See also