# RangeSliderState

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+class:androidx.compose.material3.RangeSliderState) Common/AllAndroid/JVM
- Cmn

  ```
  class RangeSliderState
  ```

*** ** * ** ***

Class that holds information about `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSlider.composable#RangeSlider(kotlin.ranges.ClosedFloatingPointRange,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors)`'s active range.

## Summary

| ### Public companion functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/runtime/saveable/Saver<https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState, *>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#Saver(kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)(steps: 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>)` The default `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#Saver(kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` implementation for `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState`. | Cmn |

| ### Public constructors |
|---|---|
| `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/annotation/RememberInComposition https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#RangeSliderState(kotlin.Float,kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)( startValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html, endValue: 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> )` | Cmn |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#endValue()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` that indicates the end of the selected range for the `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSlider.composable#RangeSlider(kotlin.ranges.ClosedFloatingPointRange,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors)`. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#startValue()` `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` that indicates the start of the selected range for the `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSlider.composable#RangeSlider(kotlin.ranges.ClosedFloatingPointRange,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors)`. | Cmn |
| `@https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 0) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#steps()` if positive, specifies the amount of discrete allowable values between the endpoints of `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#trackRange()`. | Cmn |
| `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>` | `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#trackRange()` the full range of values that the entire Range Slider track represents. | Cmn |

## Public companion functions

### Saver

Cmn

```
fun Saver(steps: Int, trackRange: ClosedFloatingPointRange<Float>): Saver<RangeSliderState, *>
```

The default `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#Saver(kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` implementation for `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState`.

| Parameters |
|---|---|
| `steps: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | if positive, specifies the amount of discrete allowable values between the endpoints of `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState.Companion#Saver(kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)`. |
| `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>` | range of values that Range Slider values can take. `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#startValue()` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#endValue()` will be coerced to this range. |

## Public constructors

### RangeSliderState

Cmn

```
@RememberInComposition
RangeSliderState(
    startValue: Float = 0.0f,
    endValue: Float = 1.0f,
    steps: @IntRange(from = 0) Int = 0,
    trackRange: ClosedFloatingPointRange<Float> = 0f..1f
)
```

| Parameters |
|---|---|
| `startValue: 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 start value of the selected range (for the start thumb). This represents a specific position on the track and is coerced to the bounds of `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#trackRange()`. |
| `endValue: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html = 1.0f` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` that indicates the initial end value of the selected range (for the end thumb). This represents a specific position on the track and is coerced to the bounds of `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#trackRange()`. |
| `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/RangeSliderState#trackRange()`. For example, a range from 0 to 10 with 4 `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#steps()` 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/RangeSliderState#steps()` 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` | the full range of values that the entire Range Slider track represents. This defines the absolute boundaries/constraints of the slider (from minimum to maximum), and the individual thumb values (`https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#(kotlin.Float,kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#(kotlin.Float,kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)`) are coerced to this range. |

## Public properties

### endValue

Cmn

```
var endValue: Float
```

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` that indicates the end of the selected range for the `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSlider.composable#RangeSlider(kotlin.ranges.ClosedFloatingPointRange,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors)`.

### startValue

Cmn

```
var startValue: Float
```

`https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` that indicates the start of the selected range for the `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSlider.composable#RangeSlider(kotlin.ranges.ClosedFloatingPointRange,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,kotlin.ranges.ClosedFloatingPointRange,kotlin.Int,kotlin.Function0,androidx.compose.material3.SliderColors)`.

### steps

Cmn

```
val steps: @IntRange(from = 0) Int
```

if positive, specifies the amount of discrete allowable values between the endpoints of `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#trackRange()`. For example, a range from 0 to 10 with 4 `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#steps()` 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/RangeSliderState#steps()` is 0, the slider will behave continuously and allow any value from the range. Must not be negative.

### trackRange

Cmn

```
val trackRange: ClosedFloatingPointRange<Float>
```

the full range of values that the entire Range Slider track represents. This defines the absolute boundaries/constraints of the slider (from minimum to maximum), and the individual thumb values (`https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#(kotlin.Float,kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)` and `https://developer.android.com/reference/kotlin/androidx/compose/material3/RangeSliderState#(kotlin.Float,kotlin.Float,kotlin.Int,kotlin.ranges.ClosedFloatingPointRange)`) are coerced to this range.