Slider Input


Sliders allow users to make selections from minimum and maximum values. Slider input allows for easy adjustments of a value and checks the updated result immediately.



val value = remember { mutableStateOf(60f) }

    value = value.value,
    onValueChange = {value.value = it},
    range = 0f..100f,
    step = 1f,
    vertical = false,
    primaryColor = XelaColor.Green2


Name Type Default Value Required Description
value Float - YES Slider value
onValueChange (Float) -> Unit - YES On value change action
range ClosedFloatingPointRange <Float> 0f..100f NO Slider range
step Float 0.1f NO Slider step
vertical Boolean false NO Slider change orientation to vertical
primaryColor Color XelaColor.Blue3 NO Slider primary - accent color
secondaryColor Color XelaColor.Gray11 NO Slider secondary color
disabled MutableState false NO Disable slider
controlIcon Int? null NO Control icon name from Drawable
controlBackground Color Color.White NO Control background color