TextButtonColors

Class

Android
public class TextButtonColors(
    public val containerColor: Color,
    public val contentColor: Color,
    public val disabledContainerColor: Color,
    public val disabledContentColor: Color,
)

Represents the container and content colors used in a text button in different states.

See TextButtonDefaults.filledTextButtonColors, TextButtonDefaults.filledTonalTextButtonColors, TextButtonDefaults.textButtonColors and TextButtonDefaults.outlinedTextButtonColors for TextButtonColors with different levels of emphasis.

Parameters

containerColorthe background color of this text button when enabled.
contentColorthe content color of this text button when enabled.
disabledContainerColorthe background color of this text button when not enabled.
disabledContentColorthe content color of this text button when not enabled.

Functions

public fun copy(
        containerColor: Color = this.containerColor,
        contentColor: Color = this.contentColor,
        disabledContainerColor: Color = this.disabledContainerColor,
        disabledContentColor: Color = this.disabledContentColor,
    ): TextButtonColors

Returns a copy of this TextButtonColors optionally overriding some of the values.

Parameters

containerColorthe background color of this text button when enabled.
contentColorthe content color of this text button when enabled.
disabledContainerColorthe background color of this text button when not enabled.
disabledContentColorthe content color of this text button when not enabled.