StylishNavigationRail

fun StylishNavigationRail(modifier: Modifier = Modifier, containerColor: Color = NavigationRailDefaults.ContainerColor, contentColor: Color = contentColorFor(containerColor), header: @Composable ColumnScope.() -> Unit? = null, windowInsets: WindowInsets = NavigationRailDefaults.windowInsets, content: @Composable ColumnScope.() -> Unit)

A Material 3 navigation rail with Stylish theme defaults.

A vertical navigation column for medium-to-large screens, wrapping NavigationRail unchanged so it keeps the full M3 behavior (window insets, header slot, and column content). Combine it with StylishNavigationRailItem for styled destinations, and place it alongside the page content (e.g. inside a com.segnities007.stylishui.components.patterns.StylishScaffold content slot) on wide layouts.

Parameters

modifier

Modifier applied to the NavigationRail root.

containerColor

Background color of the rail. Defaults to NavigationRailDefaults.ContainerColor (surfaceContainer), the Material 3 spec value.

contentColor

Default content color propagated to children. Defaults to contentColorFor of containerColor, matching M3.

header

Optional composable above the items, e.g. a logo or a menu button. Rendered inside the rail's ColumnScope.

windowInsets

WindowInsets consumed by the rail. Defaults to NavigationRailDefaults.windowInsets.

content

The destinations, laid out in a ColumnScope; typically a sequence of StylishNavigationRailItem.

See also