---
title: "RevealState"
description: "A class to keep track of the state of the composable. It can be used to customise the behavior
and state of the composable."
type: "class"
---

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


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

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


```kotlin
@SuppressLint("PrimitiveInCollection")
@ExperimentalWearMaterialApi
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

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


Snaps to the `targetValue` without any animation.

#### Parameters

| | |
| --- | --- |
| targetValue | The target `RevealValue` where the `currentValue` will be changed to. |



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


Animates to the `targetValue` with the animation spec provided.

#### Parameters

| | |
| --- | --- |
| targetValue | The target `RevealValue` where the `currentValue` will animate to. |




