# rememberSliderState

Common/AllAndroid/JVM

## Functions summary

|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderState` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/compose/material3/rememberSliderState.composable#rememberSliderState(kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)( value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, steps: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, trackRange: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-closed-floating-point-range/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> )` Creates a `https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderState` that is remembered across compositions. | Cmn |

## Functions

### rememberSliderState

Cmn Artifact: [androidx.compose.material3:material3](https://developer.android.com/jetpack/androidx/releases/compose-material3) [View Source](https://cs.android.com/search?q=file:androidx/compose/material3/Slider.kt+function:rememberSliderState)

```
@Composable
fun rememberSliderState(
    value: Float = 0.0f,
    steps: @IntRange(from = 0) Int = 0,
    trackRange: ClosedFloatingPointRange<Float> = 0f..1f
): SliderState
```

Creates a `https://developer.android.com/reference/kotlin/androidx/compose/material3/SliderState` that is remembered across compositions.

Changes to the provided initial values will **not** result in the state being recreated or changed in any way if it has already been created.

| Parameters |
|---|---|
| `value: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 0.0f` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` that indicates the initial position of the thumb. If outside of `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#rememberSliderState(kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` provided, value will be coerced to this range. |
| `steps: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = 0` | if positive, specifies the amount of discrete allowable values between the endpoints of `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#rememberSliderState(kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)`. For example, a range from 0 to 10 with 4 `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#rememberSliderState(kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` allows 4 values evenly distributed between 0 and 10 (i.e., 2, 4, 6, 8). If `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#rememberSliderState(kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` is 0, the slider will behave continuously and allow any value from the range. Must not be negative. |
| `trackRange: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.ranges/-closed-floating-point-range/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html> = 0f..1f` | range of values that Slider values can take. `https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#rememberSliderState(kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` will be coerced to this range. |