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.

Summary

Public functions

State<Color>

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

Cmn
State<Color>
@Composable
tickColor(enabled: Boolean, active: Boolean)

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.

Cmn
State<Color>
@Composable
trackColor(enabled: Boolean, active: Boolean)

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

Cmn

Public functions

thumbColor

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

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

Parameters
enabled: Boolean

whether the Slider is enabled or not

tickColor

@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
enabled: Boolean

whether the Slider is enabled or not

active: Boolean

whether the part of the track this tick is in is active of not

trackColor

@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
enabled: Boolean

whether the Slider is enabled or not

active: Boolean

whether the part of the track is active of not