# SwipeableState

Artifact: [androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material) [View Source](https://cs.android.com/search?q=file:androidx/compose/material/Swipeable.kt+class:androidx.compose.material.SwipeableState) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0) Common/AllAndroid/JVM
- Cmn

  ```
  @ExperimentalMaterialApi
  open class SwipeableState<T : Any?>
  ```
Known direct subclasses [DismissState](https://developer.android.com/reference/kotlin/androidx/compose/material/DismissState)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material/DismissState` | State of the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#SwipeToDismiss(androidx.compose.material.DismissState,androidx.compose.ui.Modifier,kotlin.collections.Set,kotlin.Function1,kotlin.Function1,kotlin.Function1)` composable. |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

State of the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` modifier.

This contains necessary information about any ongoing swipe or animation and provides methods to change the state either immediately or by starting an animation. To create and remember a `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState` with the default animation clock, use `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#rememberSwipeableState(kotlin.Any,androidx.compose.animation.core.AnimationSpec,kotlin.Function1)`.

## Summary

| ### Public companion functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/saveable/Saver<https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState<T>, T>` | `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html> [Saver](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#Saver(androidx.compose.animation.core.AnimationSpec,kotlin.Function1))( animationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, confirmStateChange: (T) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

| ### Public constructors |
|---|---|
| `<T : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> [SwipeableState](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#SwipeableState(kotlin.Any,androidx.compose.animation.core.AnimationSpec,kotlin.Function1))( initialValue: T, animationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>, confirmStateChange: (newValue) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html )` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

| ### Public functions |
|---|---|---|
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/material/ExperimentalMaterialApi [animateTo](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#animateTo(kotlin.Any,androidx.compose.animation.core.AnimationSpec))(targetValue: T, anim: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `[performDrag](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performDrag(kotlin.Float))(delta: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[performFling](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performFling(kotlin.Float))(velocity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `suspend https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/material/ExperimentalMaterialApi [snapTo](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#snapTo(kotlin.Any))(targetValue: T)` **This function is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

| ### Public properties |
|---|---|---|
| `T` | `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#currentValue()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `@https://developer.android.com/reference/kotlin/androidx/compose/material/ExperimentalMaterialApi https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#direction()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#isAnimationRunning()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#offset()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/State<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html>` | `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#overflow()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeProgress<T>` | `@https://developer.android.com/reference/kotlin/androidx/compose/material/ExperimentalMaterialApi https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#progress()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |
| `T` | `@https://developer.android.com/reference/kotlin/androidx/compose/material/ExperimentalMaterialApi https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#targetValue()` **This property is deprecated.** Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. | Cmn |

## Public companion functions

### Saver

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
fun <T : Any> [Saver](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#Saver(androidx.compose.animation.core.AnimationSpec,kotlin.Function1))(
    animationSpec: AnimationSpec<Float>,
    confirmStateChange: (T) -> Boolean
): Saver<SwipeableState<T>, T>
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

The default `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#Saver(androidx.compose.animation.core.AnimationSpec,kotlin.Function1)` implementation for `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState`.

## Public constructors

### SwipeableState

Cmn

```
<T : Any?> [SwipeableState](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#SwipeableState(kotlin.Any,androidx.compose.animation.core.AnimationSpec,kotlin.Function1))(
    initialValue: T,
    animationSpec: AnimationSpec<Float> = AnimationSpec,
    confirmStateChange: (newValue) -> Boolean = { true }
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

| Parameters |
|---|---|
| `initialValue: T` | The initial value of the state. |
| `animationSpec: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = AnimationSpec` | The default animation that will be used to animate to a new state. |
| `confirmStateChange: (newValue) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = { true }` | Optional callback invoked to confirm or veto a pending state change. |

## Public functions

### animateTo

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
@ExperimentalMaterialApi
suspend fun [animateTo](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#animateTo(kotlin.Any,androidx.compose.animation.core.AnimationSpec))(targetValue: T, anim: AnimationSpec<Float> = animationSpec): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Set the state to the target value by starting an animation.

| Parameters |
|---|---|
| `targetValue: T` | The new value to animate to. |
| `anim: https://developer.android.com/reference/kotlin/androidx/compose/animation/core/AnimationSpec<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = animationSpec` | The animation that will be used to animate to the new value. |

### performDrag

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
fun [performDrag](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performDrag(kotlin.Float))(delta: Float): Float
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Force `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` to consume drag delta provided from outside of the regular `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` gesture flow.

Note: This method performs generic drag and it won't settle to any particular anchor, \* leaving swipeable in between anchors. When done dragging, `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performFling(kotlin.Float)` must be called as well to ensure swipeable will settle at the anchor.

In general cases, `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` drags by itself when being swiped. This method is to be used for nested scroll logic that wraps the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)`. In nested scroll developer may want to force drag when the child scroll container reaches the bound.

| Parameters |
|---|---|
| `delta: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | delta in pixels to drag by |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | the amount of `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performDrag(kotlin.Float)` consumed |

### performFling

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
suspend fun [performFling](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performFling(kotlin.Float))(velocity: Float): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Perform fling with settling to one of the anchors which is determined by the given `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#performFling(kotlin.Float)`. Fling with settling `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` will always consume all the velocity provided since it will settle at the anchor.

In general cases, `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` flings by itself when being swiped. This method is to be used for nested scroll logic that wraps the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)`. In nested scroll developer may want to trigger settling fling when the child scroll container reaches the bound.

| Parameters |
|---|---|
| `velocity: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | velocity to fling and settle with |

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | the reason fling ended |

### snapTo

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
@ExperimentalMaterialApi
suspend fun [snapTo](https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#snapTo(kotlin.Any))(targetValue: T): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

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

| Parameters |
|---|---|
| `targetValue: T` | The new target value to set `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#currentValue()` to. |

## Public properties

### currentValue

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
val currentValue: T
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

The current value of the state.

If no swipe or animation is in progress, this corresponds to the anchor at which the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` is currently settled. If a swipe or animation is in progress, this corresponds the last anchor at which the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` was settled before the swipe or animation started.

### direction

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
@ExperimentalMaterialApi
val direction: Float
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

The direction in which the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` is moving, relative to the current `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#currentValue()`.

This will be either 1f if it is is moving from left to right or top to bottom, -1f if it is moving from right to left or bottom to top, or 0f if no swipe or animation is in progress.

### isAnimationRunning

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
val isAnimationRunning: Boolean
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Whether the state is currently animating.

### offset

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
val offset: State<Float>
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

The current position (in pixels) of the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)`.

You should use this state to offset your content accordingly. The recommended way is to use `Modifier.offsetPx`. This includes the resistance by default, if resistance is enabled.

### overflow

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
val overflow: State<Float>
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

The amount by which the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` has been swiped past its bounds.

### progress

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
@ExperimentalMaterialApi
val progress: SwipeProgress<T>
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

Information about the ongoing swipe or animation, if any. See `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeProgress` for details.

If no swipe or animation is in progress, this returns `SwipeProgress(value, value, 1f)`.

### targetValue

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.0.0) Deprecated in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.6.0)

```
@ExperimentalMaterialApi
val targetValue: T
```

> [!CAUTION]
> **This property is deprecated.**   
> Material's Swipeable has been replaced by Foundation's AnchoredDraggable APIs. Please see developer.android.com for an overview of the changes and a migration guide.

The target value of the state.

If a swipe is in progress, this is the value that the `https://developer.android.com/reference/kotlin/androidx/compose/material/package-summary#(androidx.compose.ui.Modifier).swipeable(androidx.compose.material.SwipeableState,kotlin.collections.Map,androidx.compose.foundation.gestures.Orientation,kotlin.Boolean,kotlin.Boolean,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function2,androidx.compose.material.ResistanceConfig,androidx.compose.ui.unit.Dp)` would animate to if the swipe finished. If an animation is running, this is the target value of that animation. Finally, if no swipe or animation is in progress, this is the same as the `https://developer.android.com/reference/kotlin/androidx/compose/material/SwipeableState#currentValue()`.