Slider
A Slider component with Miuix style.
Parameters
The current value of the Slider. If outside of valueRange provided, value will be coerced to this range.
The callback to be called when the value changes.
The modifier to be applied to the Slider.
Whether the Slider is enabled.
Range of values that this slider can take. The passed value will be coerced to this range.
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.
Called when value change has ended. This should not be used to update the slider value (use onValueChange instead), but rather to know when the user has completed selecting a new value by ending a drag or a click.
Controls the direction of this slider. When false (default), slider increases from left to right. When true, slider increases from right to left (useful for RTL layouts or custom direction requirements).
The height of the Slider.
The SliderColors of the Slider.
The haptic effect of the Slider.
Whether to show the key points (step indicators) on the slider. Only works when keyPoints is not null.
Custom key point values to display on the slider. If null, uses step positions from steps parameter. Values should be within valueRange. For example, for a range of 0f..100f, you might specify listOf(0f, 25f, 50f, 75f, 100f).
The magnetic snap threshold as a fraction (0.0 to 1.0). When the slider value is within this distance from a key point, it will snap to that point. Default is 0.02 (2%). Only applies when keyPoints is set.