---
title: "RangeSliderState"
description: "Class that holds information about [RangeSlider]'s active range."
type: "class"
---

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


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

<div class='sourceset sourceset-common'>Common</div>


```kotlin
class RangeSliderState(
    activeRangeStart: Float = 0f,
    activeRangeEnd: Float = 1f,
    @IntRange(from = 0) val steps: Int = 0,
    var onValueChangeFinished: (() -> Unit)? = null,
    val valueRange: ClosedFloatingPointRange<Float> = 0f..1f,
)
```


Class that holds information about `RangeSlider`'s active range.

#### Parameters

| | |
| --- | --- |
| activeRangeStart | `Float` that indicates the initial start of the active range of the slider. If outside of `valueRange` provided, value will be coerced to this range. |
| activeRangeEnd | `Float` that indicates the initial end of the active range of the slider. If outside of `valueRange` provided, value will be coerced to this range. |
| steps | if positive, specifies the amount of discrete allowable values between the endpoints of `valueRange`. For example, a range from 0 to 10 with 4 `steps` allows 4 values evenly distributed between 0 and 10 (i.e., 2, 4, 6, 8). If `steps` is 0, the slider will behave continuously and allow any value from the range. Must not be negative. |
| onValueChangeFinished | lambda to be invoked when value change has ended. This callback shouldn't be used to update the range slider values (use `onValueChange` for that), but rather to know when the user has completed selecting a new value by ending a drag or a click. |
| valueRange | range of values that Range Slider values can take. `activeRangeStart` and `activeRangeEnd` will be coerced to this range. |



## Properties

<div class='sourceset sourceset-common'>Common</div>


```kotlin
var activeRangeStart: Float
```


`Float` that indicates the start of the current active range for the `RangeSlider`.



<div class='sourceset sourceset-common'>Common</div>


```kotlin
var activeRangeEnd: Float
```


`Float` that indicates the end of the current active range for the `RangeSlider`.



## Companion Object

#### Methods

<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun Saver(
            onValueChangeFinished: (() -> Unit)?,
            valueRange: ClosedFloatingPointRange<Float>,
        ): Saver<RangeSliderState, *>
```


The default `Saver` implementation for `RangeSliderState`.

#### Parameters

| | |
| --- | --- |
| onValueChangeFinished | lambda to be invoked when value change has ended. This callback shouldn't be used to update the range slider values (use `onValueChange` for that), but rather to know when the user has completed selecting a new value by ending a drag or a click. |
| valueRange | range of values that Range Slider values can take. `activeRangeStart` and `activeRangeEnd` will be coerced to this range. |






