🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

SwitchColors

Represents the colors used by a Switch in different states See SwitchDefaults.colors for the default implementation that follows Material specifications.

Source set: Common
public interface SwitchColors

Represents the colors used by a Switch in different states

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

Functions

thumbColor

Source set: Common
@Composable public fun thumbColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the color used for the switch's thumb, depending on enabled and checked.

Parameters

enabled whether the Switch is enabled or not
checked whether the Switch is checked or not

trackColor

Source set: Common
@Composable public fun trackColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the color used for the switch's track, depending on enabled and checked.

Parameters

enabled whether the Switch is enabled or not
checked whether the Switch is checked or not