ToggleChipColors

interface ToggleChipColors


Represents the background and content colors used in ToggleChips in different states.

Summary

Public functions

State<Painter>
@Composable
background(enabled: Boolean, checked: Boolean)

Represents the background treatment for this chip, depending on the enabled and checked properties.

State<Color>
@Composable
contentColor(enabled: Boolean, checked: Boolean)

Represents the content color for this chip, depending on the enabled and checked properties.

State<Color>

Represents the secondary content color for this chip, depending on the enabled and checked properties.

State<Color>

Represents the color for the toggle control content for this chip, depending on the enabled and checked properties.

Public functions

background

Added in 1.0.0
@Composable
fun background(enabled: Boolean, checked: Boolean): State<Painter>

Represents the background treatment for this chip, depending on the enabled and checked properties. Backgrounds are typically a linear gradient when the chip is checked/selected and solid when it is not.

Parameters
enabled: Boolean

Whether the chip is enabled

checked: Boolean

Whether the chip is currently checked/selected or unchecked/not selected

contentColor

Added in 1.0.0
@Composable
fun contentColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the content color for this chip, depending on the enabled and checked properties.

Parameters
enabled: Boolean

Whether the chip is enabled

checked: Boolean

Whether the chip is currently checked/selected or unchecked/not selected

secondaryContentColor

Added in 1.0.0
@Composable
fun secondaryContentColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the secondary content color for this chip, depending on the enabled and checked properties.

Parameters
enabled: Boolean

Whether the chip is enabled

checked: Boolean

Whether the chip is currently checked/selected or unchecked/not selected

toggleControlColor

Added in 1.0.0
@Composable
fun toggleControlColor(enabled: Boolean, checked: Boolean): State<Color>

Represents the color for the toggle control content for this chip, depending on the enabled and checked properties.

Parameters
enabled: Boolean

Whether the chip is enabled

checked: Boolean

Whether the chip is currently checked/selected or unchecked/not selected