IconButtonDefaults



Contains the default values used by all icon button types.

Summary

Public functions

IconButtonColors

Creates a IconButtonColors that represents the default colors used in a FilledIconButton.

Cmn
IconButtonColors
@Composable
filledIconButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color
)

Creates a IconButtonColors that represents the default colors used in a FilledIconButton.

Cmn
IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a FilledIconToggleButton.

Cmn
IconToggleButtonColors
@Composable
filledIconToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

Creates a IconToggleButtonColors that represents the default colors used in a FilledIconToggleButton.

Cmn
IconButtonColors

Creates a IconButtonColors that represents the default colors used in a FilledTonalIconButton.

Cmn
IconButtonColors
@Composable
filledTonalIconButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color
)

Creates a IconButtonColors that represents the default colors used in a FilledTonalIconButton.

Cmn
IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a FilledTonalIconToggleButton.

Cmn
IconToggleButtonColors
@Composable
filledTonalIconToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

Creates a IconToggleButtonColors that represents the default colors used in a FilledTonalIconToggleButton.

Cmn
IconButtonColors

Creates a IconButtonColors that represents the default colors used in a IconButton.

Cmn
IconButtonColors
@Composable
iconButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color
)

Creates a IconButtonColors that represents the default colors used in a IconButton.

Cmn
IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton.

Cmn
IconToggleButtonColors
@Composable
iconToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton.

Cmn
BorderStroke

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled state.

Cmn
IconButtonColors

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton.

Cmn
IconButtonColors
@Composable
outlinedIconButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color
)

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton.

Cmn
BorderStroke?

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled and checked state.

Cmn
IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a OutlinedIconToggleButton.

Cmn
IconToggleButtonColors
@Composable
outlinedIconToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

Creates a IconToggleButtonColors that represents the default colors used in a OutlinedIconToggleButton.

Cmn

Public properties

Shape

Default shape for a filled icon button.

Cmn
Shape

Default shape for an outlined icon button.

Cmn

Public functions

filledIconButtonColors

@Composable
fun filledIconButtonColors(): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a FilledIconButton.

filledIconButtonColors

@Composable
fun filledIconButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = contentColorFor(containerColor),
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = Color.Unspecified
): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a FilledIconButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = contentColorFor(containerColor)

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this icon button when not enabled.

filledIconToggleButtonColors

@Composable
fun filledIconToggleButtonColors(): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a FilledIconToggleButton.

filledIconToggleButtonColors

@Composable
fun filledIconToggleButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = Color.Unspecified,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = Color.Unspecified,
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = contentColorFor(checkedContainerColor)
): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a FilledIconToggleButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = Color.Unspecified

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this icon button when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this icon button when checked.

checkedContentColor: Color = contentColorFor(checkedContainerColor)

the content color of this icon button when checked.

filledTonalIconButtonColors

@Composable
fun filledTonalIconButtonColors(): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a FilledTonalIconButton.

filledTonalIconButtonColors

@Composable
fun filledTonalIconButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = contentColorFor(containerColor),
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = Color.Unspecified
): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a FilledTonalIconButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = contentColorFor(containerColor)

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this icon button when not enabled.

filledTonalIconToggleButtonColors

@Composable
fun filledTonalIconToggleButtonColors(): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a FilledTonalIconToggleButton.

filledTonalIconToggleButtonColors

@Composable
fun filledTonalIconToggleButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = contentColorFor(containerColor),
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = Color.Unspecified,
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = Color.Unspecified
): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a FilledTonalIconToggleButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = contentColorFor(containerColor)

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this icon button when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this icon button when checked.

checkedContentColor: Color = Color.Unspecified

the content color of this icon button when checked.

iconButtonColors

@Composable
fun iconButtonColors(): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a IconButton.

iconButtonColors

@Composable
fun iconButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = LocalContentColor.current,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = contentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity)
): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a IconButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = LocalContentColor.current

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = contentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity)

the content color of this icon button when not enabled.

iconToggleButtonColors

@Composable
fun iconToggleButtonColors(): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton.

iconToggleButtonColors

@Composable
fun iconToggleButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = LocalContentColor.current,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = contentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity),
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = Color.Unspecified
): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = LocalContentColor.current

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = contentColor.copy(alpha = IconButtonTokens.DisabledIconOpacity)

the content color of this icon button when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this icon button when checked.

checkedContentColor: Color = Color.Unspecified

the content color of this icon button when checked.

outlinedIconButtonBorder

@Composable
fun outlinedIconButtonBorder(enabled: Boolean): BorderStroke

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled state.

Parameters
enabled: Boolean

whether the icon button is enabled

outlinedIconButtonColors

@Composable
fun outlinedIconButtonColors(): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton.

outlinedIconButtonColors

@Composable
fun outlinedIconButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = LocalContentColor.current,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = contentColor.copy(alpha = OutlinedIconButtonTokens.DisabledOpacity)
): IconButtonColors

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = LocalContentColor.current

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = contentColor.copy(alpha = OutlinedIconButtonTokens.DisabledOpacity)

the content color of this icon button when not enabled.

outlinedIconToggleButtonBorder

@Composable
fun outlinedIconToggleButtonBorder(enabled: Boolean, checked: Boolean): BorderStroke?

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled and checked state.

Parameters
enabled: Boolean

whether the icon button is enabled

checked: Boolean

whether the icon button is checked

outlinedIconToggleButtonColors

@Composable
fun outlinedIconToggleButtonColors(): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a OutlinedIconToggleButton.

outlinedIconToggleButtonColors

@Composable
fun outlinedIconToggleButtonColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = LocalContentColor.current,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = contentColor.copy(alpha = OutlinedIconButtonTokens.DisabledOpacity),
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = contentColorFor(checkedContainerColor)
): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the default colors used in a OutlinedIconToggleButton.

Parameters
containerColor: Color = Color.Unspecified

the container color of this icon button when enabled.

contentColor: Color = LocalContentColor.current

the content color of this icon button when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

disabledContentColor: Color = contentColor.copy(alpha = OutlinedIconButtonTokens.DisabledOpacity)

the content color of this icon button when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this icon button when checked.

checkedContentColor: Color = contentColorFor(checkedContainerColor)

the content color of this icon button when checked.

Public properties

filledShape

val filledShapeShape

Default shape for a filled icon button.

outlinedShape

val outlinedShapeShape

Default shape for an outlined icon button.