---
title: "DrawerState"
description: "State of the [NavigationDrawer] or [ModalNavigationDrawer] composable."
type: "class"
---

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


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

<div class='sourceset sourceset-android'>Android</div>


```kotlin
class DrawerState(initialValue: DrawerValue = DrawerValue.Closed)
```


State of the `NavigationDrawer` or `ModalNavigationDrawer` composable.

#### Parameters

| | |
| --- | --- |
| initialValue | the initial value (`DrawerValue.Closed` or `DrawerValue.Open`) of the drawer. |



## Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
var currentValue
```


## Functions

```kotlin
fun setValue(drawerValue: DrawerValue)
```


Updates the state of the drawer.

#### Parameters

| | |
| --- | --- |
| drawerValue | the value the state of the drawer should be set to. |



## Companion Object

#### Properties

<div class='sourceset sourceset-android'>Android</div>


```kotlin
val Saver =
        Saver<DrawerState, DrawerValue>(
            save = { it.currentValue },
            restore = { DrawerState(it) },
        )
```


The `Saver` used by `rememberDrawerState` to record and restore `DrawerState` across
activity or process recreation.





