androidx.compose.material3

WideNavigationRailStateSince 1.9

Interface

No hand-written docs yet.

A state object that can be hoisted to observe the wide navigation rail state. It allows for setting to the rail to be collapsed or expanded.

interface WideNavigationRailState

How to get one

Ready-made values and functions that return it

Used by

Parameters that take a WideNavigationRailState.

Properties

isAnimating

val isAnimating: Boolean

Whether the state is currently animating

targetValue

val targetValue: WideNavigationRailValue

Whether the rail is going to be expanded or not.

currentValue

val currentValue: WideNavigationRailValue

Whether the rail is currently expanded or not.

Functions

expand

fun expand()

Expand the rail with animation and suspend until it fully expands.

collapse

fun collapse()

Collapse the rail with animation and suspend until it fully collapses.

toggle

fun toggle()

Collapse the rail with animation if it's expanded, or expand it if it's collapsed, and suspend until it's set to its new state.

snapTo

fun snapTo(targetValue: WideNavigationRailValue)

Set the state without any animation and suspend until it's set.

Library docs

A state object that can be hoisted to observe the wide navigation rail state. It allows for setting to the rail to be collapsed or expanded.