SliderColors

Interface

Common
interface SliderColors

Represents the colors used by a Slider and its parts in different states

See SliderDefaults.colors for the default implementation that follows Material specifications.

Functions

@Composable fun thumbColor(enabled: Boolean): State<Color>

Represents the color used for the sliders's thumb, depending on enabled.

Parameters

enabledwhether the Slider is enabled or not
@Composable fun trackColor(enabled: Boolean, active: Boolean): State<Color>

Represents the color used for the sliders's track, depending on enabled and active.

Active part is filled with progress, so if sliders progress is 30% out of 100%, left (or right in RTL) 30% of the track will be active, the rest is not active.

Parameters

enabledwhether the Slider is enabled or not
activewhether the part of the track is active of not
@Composable fun tickColor(enabled: Boolean, active: Boolean): State<Color>

Represents the color used for the sliders's tick which is the dot separating steps, if they are set on the slider, depending on enabled and active.

Active tick is the tick that is in the part of the track filled with progress, so if sliders progress is 30% out of 100%, left (or right in RTL) 30% of the track and the ticks in this 30% will be active, the rest is not active.

Parameters

enabledwhether the Slider is enabled or not
activewhether the part of the track this tick is in is active of not