Skip to content
🤔 Documentation issue? Report or edit

Slider

“Sliders allow users to make selections from a range of values.”

@Composable
fun MySliderDemo() {
    var sliderPosition by remember { mutableStateOf(0f) }
    Text(text = sliderPosition.toString())
    Slider(value = sliderPosition, onValueChange = { sliderPosition = it })
}

See also:


Last update: September 1, 2021
Back to top