IconButtonDefaults

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

Types

Link copied to clipboard

Class that describes the different supported widths of the IconButton.

Properties

Link copied to clipboard

Default size for any xlarge icon button.

Link copied to clipboard
@get:Composable
val extraLargePressedShape: Shape

Default pressed shape for any extra large icon button.

Link copied to clipboard
@get:Composable
val extraLargeRoundShape: Shape

Default shape for any extra large icon button.

Link copied to clipboard
@get:Composable
val extraLargeSelectedRoundShape: Shape

Default selected shape for any extra large icon button.

Link copied to clipboard
@get:Composable
val extraLargeSelectedSquareShape: Shape

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

Link copied to clipboard
@get:Composable
val extraLargeSquareShape: Shape

Default shape for any extra large icon button.

Link copied to clipboard

Default container for any extra small icon button.

Link copied to clipboard
@get:Composable
val extraSmallPressedShape: Shape

Default pressed shape for any extra small icon button.

Link copied to clipboard
@get:Composable
val extraSmallRoundShape: Shape

Default round shape for any extra small icon button.

Link copied to clipboard
@get:Composable
val extraSmallSelectedRoundShape: Shape

Default selected shape for any extra small icon button.

Link copied to clipboard
@get:Composable
val extraSmallSelectedSquareShape: Shape

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

Link copied to clipboard
@get:Composable
val extraSmallSquareShape: Shape

Default square shape for any extra small icon button.

Link copied to clipboard
@get:Composable
val filledShape: Shape

Default shape for a filled icon button.

Link copied to clipboard

Default size for any large icon button.

Link copied to clipboard
@get:Composable
val largePressedShape: Shape

Default pressed shape for any large icon button.

Link copied to clipboard
@get:Composable
val largeRoundShape: Shape

Default shape for any large icon button.

Link copied to clipboard
@get:Composable
val largeSelectedRoundShape: Shape

Default selected shape for any large icon button.

Link copied to clipboard
@get:Composable
val largeSelectedSquareShape: Shape

Default selected shape for any large, square icon button.

Link copied to clipboard
@get:Composable
val largeSquareShape: Shape

Default shape for any large icon button.

Link copied to clipboard

Default container size for any medium icon button.

Link copied to clipboard
@get:Composable
val mediumPressedShape: Shape

Default pressed shape for any medium icon button.

Link copied to clipboard
@get:Composable
val mediumRoundShape: Shape

Default shape for any medium icon button.

Link copied to clipboard
@get:Composable
val mediumSelectedRoundShape: Shape

Default selected shape for any medium icon button.

Link copied to clipboard
@get:Composable
val mediumSelectedSquareShape: Shape

Default selected shape for any medium, square icon button.

Link copied to clipboard
@get:Composable
val mediumSquareShape: Shape

Default shape for any medium icon button.

Link copied to clipboard
@get:Composable
val outlinedShape: Shape

Default shape for an outlined icon button.

Link copied to clipboard

Default size for any small icon button.

Link copied to clipboard
@get:Composable
val smallPressedShape: Shape

Default pressed shape for any small icon button.

Link copied to clipboard
@get:Composable
val smallRoundShape: Shape

Default shape for any small icon button.

Link copied to clipboard
@get:Composable
val smallSelectedRoundShape: Shape

Default selected shape for any small icon button.

Link copied to clipboard
@get:Composable
val SmallSelectedSquareShape: Shape

Default selected shape for any small, square icon button.

Link copied to clipboard
@get:Composable
val smallSquareShape: Shape

Default square shape for any small icon button.

Link copied to clipboard
@get:Composable
val standardShape: Shape

Default ripple shape for a standard icon button.

Functions

Link copied to clipboard
fun extraLargeContainerSize(widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform): DpSize

Default container size for any extra large icon button.

Link copied to clipboard
fun extraSmallContainerSize(widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform): DpSize

Default container size for any extra small icon button.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard

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

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

Link copied to clipboard
@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.

Link copied to clipboard

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

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

Link copied to clipboard

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.

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

Link copied to clipboard
fun largeContainerSize(widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform): DpSize

Default container size for any large icon button.

Link copied to clipboard
fun mediumContainerSize(widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform): DpSize

Default container size for any medium icon button.

Link copied to clipboard
@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.

Link copied to clipboard

Creates a IconButtonColors that represents the default colors used in a OutlinedIconButton. LocalContentColor will be applied to the icon and down the UI tree.

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

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@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.

Link copied to clipboard
@Composable
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.

@Composable
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.

Link copied to clipboard
fun smallContainerSize(widthOption: IconButtonDefaults.IconButtonWidthOption = IconButtonWidthOption.Uniform): DpSize

Default container size for any small icon button.

Link copied to clipboard

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.

@Composable
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.