androidx.compose.material3

ButtonColors

Class

No hand-written docs yet.

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

class ButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
)

How to get one

Create it

Ready-made values and functions that return it

Used by

Parameters that take a ButtonColors.

Properties

containerColor

val containerColor: Color

contentColor

val contentColor: Color

disabledContainerColor

val disabledContainerColor: Color

disabledContentColor

val disabledContentColor: Color

Functions

copy

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

Returns a copy of this ButtonColors, optionally overriding some of the values. This uses the Color.Unspecified to mean “use the value from the source”

Library docs

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