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

> **Deprecated** The SwipeToReveal component from the latest material library should be used instead. This will be removed in a future release of this library.

```kotlin
@ExperimentalWearFoundationApi
public class RevealState
internal constructor(
    initialValue: RevealValue,
    animationSpec: AnimationSpec<Float>,
    confirmValueChange: (RevealValue) -> Boolean,
    positionalThreshold: (totalDistance: Float) -> Float,
    internal val anchors: Map<RevealValue, Float>,
    internal val coroutineScope: CoroutineScope,
    internal val nestedScrollDispatcher: NestedScrollDispatcher,
)
```

A class to keep track of the state of the composable. It can be used to customise the behavior
and state of the composable.

## Functions

<h2 id="snapto-targetvalue">snapTo</h2>

```kotlin
public suspend fun snapTo(targetValue: RevealValue)
```

Snaps to the [targetValue](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/RevealState) without any animation.

#### Parameters

| | |
| --- | --- |
| targetValue | The target [RevealValue](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/RevealValue) where the [currentValue](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/RevealState) will be changed to. |

<hr class="docs-overload-divider">

<h2 id="animateto-targetvalue">animateTo</h2>

```kotlin
public suspend fun animateTo(targetValue: RevealValue)
```

Animates to the [targetValue](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/RevealState) with the animation spec provided.

#### Parameters

| | |
| --- | --- |
| targetValue | The target [RevealValue](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/RevealValue) where the [currentValue](/jetpack-compose/androidx.wear.compose/compose-foundation/classes/RevealState) will animate to. |