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

ToggleButtonColors

Represents the background and content colors used in a toggle button in different states.

Source set: Android
public interface ToggleButtonColors

Represents the background and content colors used in a toggle button in different states.

See ToggleButtonDefaults.toggleButtonColors for the default colors used, which are primary-styled for a checked toggle button and surface-styled for unchecked.

Functions

backgroundColor

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

Represents the background color for this toggle button, depending on enabled and checked.

Parameters

enabled whether the toggle button is enabled
checked whether the toggle button is checked

contentColor

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

Represents the content color for this toggle button, depending on enabled and checked.

Parameters

enabled whether the toggle button is enabled
checked whether the toggle button is checked