RangeSlider

fun RangeSlider(value: ClosedFloatingPointRange<Float>, onValueChange: (ClosedFloatingPointRange<Float>) -> Unit, modifier: Modifier = Modifier, intent: SliderIntent = SliderIntent.Basic, enabled: Boolean = true, rounded: Boolean = false, valueRange: ClosedFloatingPointRange<Float> = 0f..1f, steps: Int = 0, onValueChangeFinished: () -> Unit? = null)

Spark Range slider. Range Sliders expand upon Slider using the same concepts but allow the user to select 2 values. The two values are still bounded by the value range but they also cannot cross each other. Use continuous Range Sliders to allow users to make meaningful selections that don’t require a specific values:

Parameters

value

current values of the RangeSlider. If either value is outside of valueRange provided, it will be coerced to this range.

onValueChange

lambda in which values should be updated

modifier

modifiers for the Range Slider layout

intent

The intent color for the Slider.

enabled

whether or not component is enabled and can we interacted with or not

valueRange

range of values that Range Slider values can take. Passed value will be coerced to this range

steps

if greater than 0, specifies the amounts of discrete values, evenly distributed between across the whole value range. If 0, range slider will behave as a continuous slider and allow to choose any value from the range specified. 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.