ToggleButtonDefaults

Contains the default values for all five toggle button types.

Properties

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

The default checked shape for ToggleButton

Link copied to clipboard
val ContentPadding: PaddingValues

The default content padding used by all toggle buttons.

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

The default checked square shape for a extra large toggle button

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

The default pressed shape for a extra large toggle button

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

The default square shape for a extra large toggle button

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

The default checked square shape for a extra small toggle button

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

The default pressed shape for a extra small toggle button

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

The default square shape for a extra small toggle button

Link copied to clipboard
val IconSize: Dp

The default size of the spacing between an icon and a text when they used inside any toggle button.

Link copied to clipboard
val IconSpacing: Dp

The default size of the spacing between an icon and a text when they used inside any toggle button.

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

The default checked square shape for a large toggle button

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

The default pressed shape for a large toggle button

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

The default square shape for a large toggle button

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

The default checked square shape for a medium toggle button

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

The default pressed shape for a medium toggle button

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

The default square shape for a medium toggle button

Link copied to clipboard
val MinHeight: Dp

The default min height applied for all toggle buttons. Note that you can override it by applying Modifier.heightIn directly on the toggle button composable.

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

The default pressed shape for ToggleButton

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

A round shape that can be used for all ToggleButtons and its variants

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

The default unchecked shape for ToggleButton

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

A square shape that can be used for all ToggleButtons and its variants

Functions

Link copied to clipboard
@Composable
fun elevatedToggleButtonColors(containerColor: Color = Color.Unspecified, contentColor: Color = Color.Unspecified, disabledContainerColor: Color = Color.Unspecified, disabledContentColor: Color = Color.Unspecified, checkedContainerColor: Color = Color.Unspecified, checkedContentColor: Color = Color.Unspecified): ToggleButtonColors

Creates a ToggleButtonColors that represents the default container and content colors used in a ElevatedToggleButton.

Link copied to clipboard
@Composable
fun outlinedToggleButtonColors(containerColor: Color = Color.Unspecified, contentColor: Color = Color.Unspecified, disabledContainerColor: Color = Color.Unspecified, disabledContentColor: Color = Color.Unspecified, checkedContainerColor: Color = Color.Unspecified, checkedContentColor: Color = Color.Unspecified): ToggleButtonColors

Creates a ToggleButtonColors that represents the default container and content colors used in a OutlinedToggleButton.

Link copied to clipboard
@Composable
fun shapes(): ToggleButtonShapes

Creates a ToggleButtonShapes that represents the default shape, pressedShape, and checkedShape used in a ToggleButton.

@Composable
fun shapes(shape: Shape? = null, pressedShape: Shape? = null, checkedShape: Shape? = null): ToggleButtonShapes

Creates a ToggleButtonShapes that represents the default shape, pressedShape, and checkedShape used in a ToggleButton and its variants.

Link copied to clipboard
@Composable
fun shapesFor(buttonHeight: Dp): ToggleButtonShapes

Recommended ToggleButtonShapes for a provided toggle button height.

Link copied to clipboard
@Composable
fun toggleButtonColors(containerColor: Color = Color.Unspecified, contentColor: Color = Color.Unspecified, disabledContainerColor: Color = Color.Unspecified, disabledContentColor: Color = Color.Unspecified, checkedContainerColor: Color = Color.Unspecified, checkedContentColor: Color = Color.Unspecified): ToggleButtonColors

Creates a ToggleButtonColors that represents the default container and content colors used in a ToggleButton.

Link copied to clipboard
@Composable
fun tonalToggleButtonColors(containerColor: Color = Color.Unspecified, contentColor: Color = Color.Unspecified, disabledContainerColor: Color = Color.Unspecified, disabledContentColor: Color = Color.Unspecified, checkedContainerColor: Color = Color.Unspecified, checkedContentColor: Color = Color.Unspecified): ToggleButtonColors

Creates a ToggleButtonColors that represents the default container and content colors used in a TonalToggleButton.