ToggleButtonColors

Interface

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

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

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

Parameters

enabledwhether the toggle button is enabled
checkedwhether the toggle button is checked
@Composable public fun contentColor(enabled: Boolean, checked: Boolean): State<Color>

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

Parameters

enabledwhether the toggle button is enabled
checkedwhether the toggle button is checked