---
title: "WideNavigationRailState"
description: "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."
type: "interface"
---

<div class='type'>Interface</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>



```kotlin
interface WideNavigationRailState
```


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.


## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
val isAnimating: Boolean
```


Whether the state is currently animating



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val targetValue: WideNavigationRailValue
```


Whether the rail is going to be expanded or not.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
val currentValue: WideNavigationRailValue
```


Whether the rail is currently expanded or not.



## Functions

```kotlin
suspend fun expand()
```


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


```kotlin
suspend fun collapse()
```


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


```kotlin
suspend 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.


```kotlin
suspend fun snapTo(targetValue: WideNavigationRailValue)
```


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

#### Parameters

| | |
| --- | --- |
| targetValue | the expanded boolean to set to |




