Start native apps faster with the Composables CLI ->
Object

IconButtonDefaults

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

Source set: Common
public object IconButtonDefaults

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

Properties

standardShape

Source set: Common
public val standardShape: Shape

Default ripple shape for a standard icon button.

filledShape

Source set: Common
public val filledShape: Shape

Default shape for a filled icon button.

outlinedShape

Source set: Common
public val outlinedShape: Shape

Default shape for an outlined icon button.

extraSmallRoundShape

Source set: Common
public val extraSmallRoundShape: Shape

Default round shape for any extra small icon button.

extraSmallSquareShape

Source set: Common
public val extraSmallSquareShape: Shape

Default square shape for any extra small icon button.

extraSmallPressedShape

Source set: Common
public val extraSmallPressedShape: Shape

Default pressed shape for any extra small icon button.

extraSmallSelectedRoundShape

Source set: Common
public val extraSmallSelectedRoundShape: Shape

Default selected shape for any extra small icon button.

extraSmallSelectedSquareShape

Source set: Common
public val extraSmallSelectedSquareShape: Shape

Default selected shape for any extra small, square icon button.

smallRoundShape

Source set: Common
public val smallRoundShape: Shape

Default shape for any small icon button.

smallSquareShape

Source set: Common
public val smallSquareShape: Shape

Default square shape for any small icon button.

smallPressedShape

Source set: Common
public val smallPressedShape: Shape

Default pressed shape for any small icon button.

smallSelectedRoundShape

Source set: Common
public val smallSelectedRoundShape: Shape

Default selected shape for any small icon button.

smallSelectedSquareShape

Source set: Common
public val smallSelectedSquareShape: Shape

Default selected shape for any small, square icon button.

SmallSelectedSquareShape

Source set: Common
@Deprecated(
        message = "Use the camel case version",
        replaceWith = ReplaceWith("smallSelectedSquareShape"),
        level = DeprecationLevel.HIDDEN,
    )
    @get:JvmName("getSmallSelectedSquareShape_pascalName") // Renames the JVM signature
    public val SmallSelectedSquareShape: Shape

mediumRoundShape

Source set: Common
public val mediumRoundShape: Shape

Default shape for any medium icon button.

mediumSquareShape

Source set: Common
public val mediumSquareShape: Shape

Default shape for any medium icon button.

mediumPressedShape

Source set: Common
public val mediumPressedShape: Shape

Default pressed shape for any medium icon button.

mediumSelectedRoundShape

Source set: Common
public val mediumSelectedRoundShape: Shape

Default selected shape for any medium icon button.

mediumSelectedSquareShape

Source set: Common
public val mediumSelectedSquareShape: Shape

Default selected shape for any medium, square icon button.

largeRoundShape

Source set: Common
public val largeRoundShape: Shape

Default shape for any large icon button.

largeSquareShape

Source set: Common
public val largeSquareShape: Shape

Default shape for any large icon button.

largePressedShape

Source set: Common
public val largePressedShape: Shape

Default pressed shape for any large icon button.

largeSelectedRoundShape

Source set: Common
public val largeSelectedRoundShape: Shape

Default selected shape for any large icon button.

largeSelectedSquareShape

Source set: Common
public val largeSelectedSquareShape: Shape

Default selected shape for any large, square icon button.

extraLargeRoundShape

Source set: Common
public val extraLargeRoundShape: Shape

Default shape for any extra large icon button.

extraLargeSquareShape

Source set: Common
public val extraLargeSquareShape: Shape

Default shape for any extra large icon button.

extraLargePressedShape

Source set: Common
public val extraLargePressedShape: Shape

Default pressed shape for any extra large icon button.

extraLargeSelectedRoundShape

Source set: Common
public val extraLargeSelectedRoundShape: Shape

Default selected shape for any extra large icon button.

extraLargeSelectedSquareShape

Source set: Common
public val extraLargeSelectedSquareShape: Shape

Default selected shape for any extra large, square icon button.

extraSmallIconSize

Source set: Common
public val extraSmallIconSize: Dp = XSmallIconButtonTokens.IconSize

Default container for any extra small icon button.

smallIconSize

Source set: Common
public val smallIconSize: Dp = SmallIconButtonTokens.IconSize

Default size for any small icon button.

mediumIconSize

Source set: Common
public val mediumIconSize: Dp = MediumIconButtonTokens.IconSize

Default container size for any medium icon button.

largeIconSize

Source set: Common
public val largeIconSize: Dp = LargeIconButtonTokens.IconSize

Default size for any large icon button.

extraLargeIconSize

Source set: Common
public val extraLargeIconSize: Dp = XLargeIconButtonTokens.IconSize

Default size for any xlarge icon button.

Functions

iconButtonColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled. By default, this will use the current LocalContentColor value.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.

iconButtonVibrantColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.

iconToggleButtonColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.
checkedContainerColor the container color of this icon button when checked.
checkedContentColor the content color of this icon button when checked.

iconToggleButtonVibrantColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.
checkedContainerColor the container color of this icon button when checked.
checkedContentColor the content color of this icon button when checked.

filledIconButtonColors

Source set: Common
@Composable
    public fun filledIconButtonColors(): IconButtonColors

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

filledIconButtonColors

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.

filledIconToggleButtonColors

Source set: Common
@Composable
    public fun filledIconToggleButtonColors(): IconToggleButtonColors

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

filledIconToggleButtonColors

Source set: Common
@Composable
    public fun filledIconToggleButtonColors(
        containerColor: Color = Color.Unspecified,
        // TODO(b/228455081): Using contentColorFor here will return OnSurfaceVariant,
        //  while the token value is Primary.
        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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.
checkedContainerColor the container color of this icon button when checked.
checkedContentColor the content color of this icon button when checked.

filledTonalIconButtonColors

Source set: Common
@Composable
    public fun filledTonalIconButtonColors(): IconButtonColors

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

filledTonalIconButtonColors

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.

filledTonalIconToggleButtonColors

Source set: Common
@Composable
    public fun filledTonalIconToggleButtonColors(): IconToggleButtonColors

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

filledTonalIconToggleButtonColors

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.
checkedContainerColor the container color of this icon button when checked.
checkedContentColor the content color of this icon button when checked.

outlinedIconButtonColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.

outlinedIconButtonVibrantColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.

outlinedIconToggleButtonColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.
checkedContainerColor the container color of this icon button when checked.
checkedContentColor the content color of this icon button when checked.

outlinedIconToggleButtonVibrantColors

Source set: Common
@Composable
    public 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

Source set: Common
@Composable
    public 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 the container color of this icon button when enabled.
contentColor the content color of this icon button when enabled.
disabledContainerColor the container color of this icon button when not enabled.
disabledContentColor the content color of this icon button when not enabled.
checkedContainerColor the container color of this icon button when checked.
checkedContentColor the content color of this icon button when checked.

outlinedIconToggleButtonBorder

Source set: Common
@Composable
    public 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 whether the icon button is enabled
checked whether the icon button is checked

outlinedIconToggleButtonVibrantBorder

Source set: Common
@Composable
    public 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 whether the icon button is enabled
checked whether the icon button is checked

outlinedIconButtonBorder

Source set: Common
@Composable
    public 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 whether the icon button is enabled

outlinedIconButtonVibrantBorder

Source set: Common
@Composable
    public 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 whether the icon button is enabled

shapes

Source set: Common
@Composable
    public fun shapes(shape: Shape? = null, pressedShape: Shape? = null): IconButtonShapes

Creates a IconButtonShapes that correspond to the shapes in the default or pressed states. Icon button will morph between these shapes as long as the shapes are all CornerBasedShapes.

Parameters

shape the unchecked shape for ButtonShapes
pressedShape the unchecked shape for ButtonShapes

shapes

Source set: Common
@Composable public fun shapes(): IconButtonShapes

Creates a IconButtonShapes that correspond to a default IconButton in the active and pressed states. IconButton will morph between these shapes as long as the shapes are all CornerBasedShapes.

toggleableShapes

Source set: Common
@Composable
    public fun toggleableShapes(
        shape: Shape? = null,
        pressedShape: Shape? = null,
        checkedShape: Shape? = null,
    ): IconToggleButtonShapes

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

Parameters

shape the active shape for IconToggleButtonShapes
pressedShape the pressed shape for IconToggleButtonShapes
checkedShape the checked shape for IconToggleButtonShapes

toggleableShapes

Source set: Common
@Composable
    public fun toggleableShapes(): IconToggleButtonShapes

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

extraSmallContainerSize

Source set: Common
public fun extraSmallContainerSize(
        widthOption: IconButtonWidthOption = IconButtonWidthOption.Uniform
    ): DpSize

Default container size for any extra small icon button.

Parameters

widthOption the width of the container

smallContainerSize

Source set: Common
public fun smallContainerSize(
        widthOption: IconButtonWidthOption = IconButtonWidthOption.Uniform
    ): DpSize

Default container size for any small icon button.

Parameters

widthOption the width of the container

mediumContainerSize

Source set: Common
public fun mediumContainerSize(
        widthOption: IconButtonWidthOption = IconButtonWidthOption.Uniform
    ): DpSize

Default container size for any medium icon button.

Parameters

widthOption the width of the container

largeContainerSize

Source set: Common
public fun largeContainerSize(
        widthOption: IconButtonWidthOption = IconButtonWidthOption.Uniform
    ): DpSize

Default container size for any large icon button.

Parameters

widthOption the width of the container

extraLargeContainerSize

Source set: Common
public fun extraLargeContainerSize(
        widthOption: IconButtonWidthOption = IconButtonWidthOption.Uniform
    ): DpSize

Default container size for any extra large icon button.

Parameters

widthOption the width of the container

Members

IconButtonWidthOption

Source set: Common
public class IconButtonWidthOption private constructor(private val value: Int)

Class that describes the different supported widths of the IconButton.

Members

Companion

Source set: Common
public companion object

Properties

Narrow

Source set: Common
public val Narrow: IconButtonWidthOption

Uniform

Source set: Common
public val Uniform: IconButtonWidthOption

Wide

Source set: Common
public val Wide: IconButtonWidthOption