VerticalSlider

fun VerticalSlider(value: Float, onValueChange: (Float) -> Unit, modifier: Modifier = Modifier, enabled: Boolean = true, valueRange: ClosedFloatingPointRange<Float> = 0f..1f, @IntRange(from = 0) steps: Int = 0, onValueChangeFinished: () -> Unit? = null, reverseDirection: Boolean = false, width: Dp = SliderDefaults.MinHeight, colors: SliderColors = SliderDefaults.sliderColors(), effect: Boolean = false, hapticEffect: SliderDefaults.SliderHapticEffect = SliderDefaults.DefaultHapticEffect, showKeyPoints: Boolean = false, keyPoints: List<Float>? = null, magnetThreshold: Float = 0.02f)

A vertical Slider component with Miuix style.

Parameters

value

The current value of the Slider. If outside of valueRange provided, value will be coerced to this range.

onValueChange

The callback to be called when the value changes.

modifier

The modifier to be applied to the Slider.

enabled

Whether the Slider is enabled.

valueRange

Range of values that this slider can take. The passed value will be coerced to this range.

steps

If positive, specifies the amount of discrete allowable values between the endpoints of valueRange.

onValueChangeFinished

Called when value change has ended.

reverseDirection

Controls the direction of this slider. When false (default), slider increases from bottom to top. When true, slider increases from top to bottom.

width

The width of the vertical Slider.

colors

The SliderColors of the Slider.

effect

Whether to show the effect of the Slider.

hapticEffect

The haptic effect of the Slider.

showKeyPoints

Whether to show the key points (step indicators) on the slider. Only works when keyPoints is not null.

keyPoints

Custom key point values to display on the slider. If null, uses step positions from steps parameter. Values should be within valueRange.