WideNavigationRail

Functions summary

Unit
@ExperimentalMaterial3ExpressiveApi
@ExperimentalMaterial3XrApi
@Composable
WideNavigationRail(
    modifier: Modifier,
    state: WideNavigationRailState,
    colors: WideNavigationRailColors,
    header: (@Composable () -> Unit)?,
    content: @Composable () -> Unit
)

XR-specific Material design wide navigation rail.

Functions

WideNavigationRail

@ExperimentalMaterial3ExpressiveApi
@ExperimentalMaterial3XrApi
@Composable
fun WideNavigationRail(
    modifier: Modifier = Modifier,
    state: WideNavigationRailState = rememberWideNavigationRailState(),
    colors: WideNavigationRailColors = WideNavigationRailDefaults.colors(),
    header: (@Composable () -> Unit)? = null,
    content: @Composable () -> Unit
): Unit

XR-specific Material design wide navigation rail.

Wide navigation rails provide access to primary destinations in apps when using tablet and desktop screens.

The wide navigation rail should be used to display multiple WideNavigationRailItems, each representing a singular app destination, and, optionally, a header containing a menu button, a FloatingActionButton, and/or a logo. Each destination is typically represented by an icon and a text label.

The WideNavigationRail is collapsed by default, but it also supports being expanded via a WideNavigationRailState. When collapsed, the rail should display three to seven navigation items.

See WideNavigationRailItem for configuration specific to each item, and not the overall WideNavigationRail component.

Parameters
modifier: Modifier = Modifier

the Modifier to be applied to this wide navigation rail

state: WideNavigationRailState = rememberWideNavigationRailState()

the WideNavigationRailState of this wide navigation rail

colors: WideNavigationRailColors = WideNavigationRailDefaults.colors()

WideNavigationRailColors that will be used to resolve the colors used for this wide navigation rail. See WideNavigationRailDefaults.colors

header: (@Composable () -> Unit)? = null

optional header that may hold a FloatingActionButton or a logo

content: @Composable () -> Unit

the content of this wide navigation rail, typically WideNavigationRailItems