IconButtonDefaults


Contains the default values for all four icon and icon toggle button types.

Summary

Nested types

Class that describes the different supported widths of the IconButton.

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

Contains the default values used by 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
IconButtonColors

Creates a IconButtonColors that represents the recommended high contrast colors used in an IconButton.

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

Creates a IconButtonColors that represents the recommended high contrast colors used in an 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
IconToggleButtonColors

Creates a IconToggleButtonColors that represents the recommended high contrast colors used in a IconToggleButton.

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

Creates a IconToggleButtonColors that represents the recommended high contrast colors used in a IconToggleButton.

Cmn
DpSize

Default container size for any large icon button.

Cmn
DpSize

Default container size for any medium icon button.

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 state.

Cmn
IconButtonColors

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

Cmn
IconButtonColors
@Composable
outlinedIconButtonVibrantColors(
    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
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
outlinedIconToggleButtonVibrantColors(
    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
IconButtonShapes
@ExperimentalMaterial3ExpressiveApi
@Composable
shapes(shape: Shape, pressedShape: Shape, checkedShape: Shape)

Creates a ButtonShapes that correspond to the shapes in the default, pressed, and checked states.

Cmn
DpSize

Default container size for any small icon button.

Cmn
DpSize

Default container size for any extra large icon button.

Cmn
DpSize

Default container size for any extra small icon button.

Cmn

Public properties

Shape

Default shape for a filled icon button.

Cmn
Dp

Default size for any large icon button.

Cmn
Shape

Default pressed shape for any large icon button.

Cmn
Shape

Default shape for any large icon button.

Cmn
Shape

Default shape for any large icon button.

Cmn
Dp

Default container size for any medium icon button.

Cmn
Shape

Default pressed shape for any medium icon button.

Cmn
Shape

Default shape for any medium icon button.

Cmn
Shape

Default shape for any medium icon button.

Cmn
Shape

Default shape for an outlined icon button.

Cmn
Dp

Default size for any small icon button.

Cmn
Shape

Default pressed shape for any small icon button.

Cmn
Shape

Default shape for any small icon button.

Cmn
Shape

Default shape for any small icon button.

Cmn
Shape

Default ripple shape for a standard icon button.

Cmn
Dp

Default size for any xlarge icon button.

Cmn
Shape

Default pressed shape for any extra large icon button.

Cmn
Shape

Default shape for any xlarge icon button.

Cmn
Shape

Default shape for any xlarge icon button.

Cmn
Dp

Default container for any extra small icon button.

Cmn
Shape

Default pressed shape for any extra small icon button.

Cmn
Shape

Default round shape for any extra small icon button.

Cmn
Shape

Default square shape for any extra small 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 = contentColorFor(checkedContainerColor)
): 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 = contentColorFor(checkedContainerColor)

the content color of this icon button when checked.

iconButtonColors

@Composable
fun iconButtonColors(): IconButtonColors

Contains the default values used by IconButton. LocalContentColor will be applied to the icon and down the UI tree.

See iconButtonVibrantColors for default values that applies the recommended high contrast colors.

iconButtonColors

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

Creates a IconButtonColors that represents the default colors used in a IconButton. LocalContentColor will be applied to the icon and down the UI tree unless a custom contentColor is provided.

See iconButtonVibrantColors for default values that applies the recommended high contrast colors.

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. By default, this will use the current LocalContentColor value.

disabledContainerColor: Color = Color.Unspecified

the container color of this icon button when not enabled.

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

the content color of this icon button when not enabled.

iconButtonVibrantColors

@Composable
fun iconButtonVibrantColors(): IconButtonColors

Creates a IconButtonColors that represents the recommended high contrast colors used in an IconButton.

See iconButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

iconButtonVibrantColors

@Composable
fun iconButtonVibrantColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = Color.Unspecified,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = contentColor.copy(alpha = StandardIconButtonTokens.DisabledOpacity)
): IconButtonColors

Creates a IconButtonColors that represents the recommended high contrast colors used in an IconButton.

See iconButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

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 = contentColor.copy(alpha = StandardIconButtonTokens.DisabledOpacity)

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. LocalContentColor will be applied to the icon and down the UI tree.

See iconToggleButtonVibrantColors for default values that applies the recommended high contrast colors.

iconToggleButtonColors

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

Creates a IconToggleButtonColors that represents the default colors used in a IconToggleButton. LocalContentColor will be applied to the icon and down the UI tree unless a custom contentColor is provided.

See iconToggleButtonVibrantColors for default values that applies the recommended high contrast colors.

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 = StandardIconButtonTokens.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 = Color.Unspecified

the content color of this icon button when checked.

iconToggleButtonVibrantColors

@Composable
fun iconToggleButtonVibrantColors(): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the recommended high contrast colors used in a IconToggleButton. See iconToggleButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

iconToggleButtonVibrantColors

@Composable
fun iconToggleButtonVibrantColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = Color.Unspecified,
    disabledContainerColor: Color = Color.Unspecified,
    disabledContentColor: Color = contentColor.copy(alpha = StandardIconButtonTokens.DisabledOpacity),
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = Color.Unspecified
): IconToggleButtonColors

Creates a IconToggleButtonColors that represents the recommended high contrast colors used in a IconToggleButton.

See iconToggleButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

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 = contentColor.copy(alpha = StandardIconButtonTokens.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 = Color.Unspecified

the content color of this icon button when checked.

largeContainerSize

@ExperimentalMaterial3ExpressiveApi
fun largeContainerSize(
    widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform
): DpSize

Default container size for any large icon button.

Parameters
widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform

the width of the container

mediumContainerSize

@ExperimentalMaterial3ExpressiveApi
fun mediumContainerSize(
    widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform
): DpSize

Default container size for any medium icon button.

Parameters
widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform

the width of the container

outlinedIconButtonBorder

@Composable
fun outlinedIconButtonBorder(enabled: Boolean): BorderStroke

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled state. LocalContentColor will be used as the border color.

See outlinedIconToggleButtonVibrantBorder for a BorderStroke that uses the spec recommended color as the border color.

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. LocalContentColor will be applied to the icon and down the UI tree.

See outlinedIconButtonVibrantColors for default values that applies the recommended high contrast colors.

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.

See outlinedIconButtonVibrantColors for default values that applies the recommended high contrast colors.

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.

outlinedIconButtonVibrantBorder

@Composable
fun outlinedIconButtonVibrantBorder(enabled: Boolean): BorderStroke

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled state. The spec recommended color will be used as the border color.

Parameters
enabled: Boolean

whether the icon button is enabled

outlinedIconButtonVibrantColors

@Composable
fun outlinedIconButtonVibrantColors(): IconButtonColors

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

See outlinedIconButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

outlinedIconButtonVibrantColors

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

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

See outlinedIconButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

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 = 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. LocalContentColor will be used as the border color.

See outlinedIconToggleButtonVibrantBorder for a BorderStroke that uses the spec recommended color as the border color.

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. LocalContentColor will be applied to the icon and down the UI tree.

See outlinedIconButtonVibrantColors for default values that applies the recommended high contrast colors.

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. LocalContentColor will be applied to the icon and down the UI tree.

See outlinedIconButtonVibrantColors for default values that applies the recommended high contrast colors.

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.

outlinedIconToggleButtonVibrantBorder

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

Represents the BorderStroke for an OutlinedIconButton, depending on its enabled and checked state. The spec recommended color will be used as the border color.

Parameters
enabled: Boolean

whether the icon button is enabled

checked: Boolean

whether the icon button is checked

outlinedIconToggleButtonVibrantColors

@Composable
fun outlinedIconToggleButtonVibrantColors(): IconToggleButtonColors

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

See outlinedIconToggleButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

outlinedIconToggleButtonVibrantColors

@Composable
fun outlinedIconToggleButtonVibrantColors(
    containerColor: Color = Color.Unspecified,
    contentColor: Color = Color.Unspecified,
    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.

See outlinedIconToggleButtonColors for default values that applies LocalContentColor to the icon and down the UI tree.

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 = 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.

shapes

@ExperimentalMaterial3ExpressiveApi
@Composable
fun shapes(shape: Shape, pressedShape: Shape, checkedShape: Shape): IconButtonShapes

Creates a ButtonShapes that correspond to the shapes in the default, pressed, and checked states. Toggle button will morph between these shapes as long as the shapes are all CornerBasedShapes.

Parameters
shape: Shape

the unchecked shape for ButtonShapes

pressedShape: Shape

the unchecked shape for ButtonShapes

checkedShape: Shape

the unchecked shape for ButtonShapes

smallContainerSize

@ExperimentalMaterial3ExpressiveApi
fun smallContainerSize(
    widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform
): DpSize

Default container size for any small icon button.

Parameters
widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform

the width of the container

xLargeContainerSize

@ExperimentalMaterial3ExpressiveApi
fun xLargeContainerSize(
    widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform
): DpSize

Default container size for any extra large icon button.

Parameters
widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform

the width of the container

xSmallContainerSize

@ExperimentalMaterial3ExpressiveApi
fun xSmallContainerSize(
    widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform
): DpSize

Default container size for any extra small icon button.

Parameters
widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform

the width of the container

Public properties

filledShape

val filledShapeShape

Default shape for a filled icon button.

largeIconSize

@ExperimentalMaterial3ExpressiveApi
val largeIconSizeDp

Default size for any large icon button.

largePressedShape

@ExperimentalMaterial3ExpressiveApi
val largePressedShapeShape

Default pressed shape for any large icon button.

largeRoundShape

@ExperimentalMaterial3ExpressiveApi
val largeRoundShapeShape

Default shape for any large icon button.

largeSquareShape

@ExperimentalMaterial3ExpressiveApi
val largeSquareShapeShape

Default shape for any large icon button.

mediumIconSize

@ExperimentalMaterial3ExpressiveApi
val mediumIconSizeDp

Default container size for any medium icon button.

mediumPressedShape

@ExperimentalMaterial3ExpressiveApi
val mediumPressedShapeShape

Default pressed shape for any medium icon button.

mediumRoundShape

@ExperimentalMaterial3ExpressiveApi
val mediumRoundShapeShape

Default shape for any medium icon button.

mediumSquareShape

@ExperimentalMaterial3ExpressiveApi
val mediumSquareShapeShape

Default shape for any medium icon button.

outlinedShape

val outlinedShapeShape

Default shape for an outlined icon button.

smallIconSize

@ExperimentalMaterial3ExpressiveApi
val smallIconSizeDp

Default size for any small icon button.

smallPressedShape

@ExperimentalMaterial3ExpressiveApi
val smallPressedShapeShape

Default pressed shape for any small icon button.

smallRoundShape

@ExperimentalMaterial3ExpressiveApi
val smallRoundShapeShape

Default shape for any small icon button.

smallSquareShape

@ExperimentalMaterial3ExpressiveApi
val smallSquareShapeShape

Default shape for any small icon button.

standardShape

val standardShapeShape

Default ripple shape for a standard icon button.

xLargeIconSize

@ExperimentalMaterial3ExpressiveApi
val xLargeIconSizeDp

Default size for any xlarge icon button.

xLargePressedShape

@ExperimentalMaterial3ExpressiveApi
val xLargePressedShapeShape

Default pressed shape for any extra large icon button.

xLargeRoundShape

@ExperimentalMaterial3ExpressiveApi
val xLargeRoundShapeShape

Default shape for any xlarge icon button.

xLargeSquareShape

@ExperimentalMaterial3ExpressiveApi
val xLargeSquareShapeShape

Default shape for any xlarge icon button.

xSmallIconSize

@ExperimentalMaterial3ExpressiveApi
val xSmallIconSizeDp

Default container for any extra small icon button.

xSmallPressedShape

@ExperimentalMaterial3ExpressiveApi
val xSmallPressedShapeShape

Default pressed shape for any extra small icon button.

xSmallRoundShape

@ExperimentalMaterial3ExpressiveApi
val xSmallRoundShapeShape

Default round shape for any extra small icon button.

xSmallSquareShape

@ExperimentalMaterial3ExpressiveApi
val xSmallSquareShapeShape

Default square shape for any extra small icon button.