Package-level declarations

Sliders A slider is an interactive component that allows users to set values by moving a handle within a defined range.

Variants

2 Variants:

Slider

Provides the slider with a minimum and maximum value.

Slider(
value = 0.5f,
intent = SliderIntent.Success,
onValueChange = {},
)
Variants

Range Slider

Provides the slider with a set of two values (range).

RangeSlider(
value = 0.1f..0.5f,
intent = SliderIntent.Success,
onValueChange = {},
)
Variants

Types

Link copied to clipboard
Link copied to clipboard

SliderIntent is used to define the intent of the sliders.

Functions

Link copied to clipboard
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:

Link copied to clipboard
fun Slider(value: Float, onValueChange: (Float) -> Unit, modifier: Modifier = Modifier, valueRange: ClosedFloatingPointRange<Float> = 0f..1f, onValueChangeFinished: () -> Unit? = null, enabled: Boolean = true, rounded: Boolean = false, steps: Int = 0, intent: SliderIntent = SliderIntent.Basic, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

Spark slider. Sliders allow users to make selections from a range of values. Sliders reflect a range of values along a bar, from which users may select a single value. They are ideal for adjusting settings such as volume, brightness, or applying image filters.