ToggleButtonDefaults


Contains the default values for all five toggle button types.

Summary

Public functions

ToggleButtonColors

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

Cmn
ToggleButtonColors
@Composable
elevatedToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

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

Cmn
ToggleButtonColors

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

Cmn
ToggleButtonColors
@Composable
outlinedToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

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

Cmn
ButtonShapes

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

Cmn
ButtonShapes
@Composable
shapes(shape: Shape?, pressedShape: Shape?, checkedShape: Shape?)

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

Cmn
ToggleButtonColors

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

Cmn
ToggleButtonColors
@Composable
toggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

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

Cmn
ToggleButtonColors

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

Cmn
ToggleButtonColors
@Composable
tonalToggleButtonColors(
    containerColor: Color,
    contentColor: Color,
    disabledContainerColor: Color,
    disabledContentColor: Color,
    checkedContainerColor: Color,
    checkedContentColor: Color
)

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

Cmn

Public properties

PaddingValues

The default content padding used by all toglge buttons.

Cmn
Dp

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

Cmn
Dp

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

Cmn
Shape

The default checked square shape for a large toggle button

Cmn
Shape

The default pressed shape for a large toggle button

Cmn
Shape

The default square shape for a large toggle button

Cmn
Shape

The default checked square shape for a medium toggle button

Cmn
Shape

The default pressed shape for a medium toggle button

Cmn
Shape

The default square shape for a medium toggle button

Cmn
Dp

The default min height applied for all toggle buttons.

Cmn
Shape

The default checked square shape for a extra large toggle button

Cmn
Shape

The default pressed shape for a extra large toggle button

Cmn
Shape

The default square shape for a extra large toggle button

Cmn
Shape

The default checked square shape for a extra small toggle button

Cmn
Shape

The default pressed shape for a extra small toggle button

Cmn
Shape

The default square shape for a extra small toggle button

Cmn
Shape

The default checked shape for ToggleButton

Cmn
Shape

The default pressed shape for ToggleButton

Cmn
Shape

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

Cmn
Shape

The default unchecked shape for ToggleButton

Cmn
Shape

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

Cmn

Public functions

elevatedToggleButtonColors

@Composable
fun elevatedToggleButtonColors(): ToggleButtonColors

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

elevatedToggleButtonColors

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

Parameters
containerColor: Color = Color.Unspecified

the container color of this ElevatedToggleButton when enabled.

contentColor: Color = Color.Unspecified

the content color of this ElevatedToggleButton when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this ElevatedToggleButton when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this ElevatedToggleButton when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this ElevatedToggleButton when checked.

checkedContentColor: Color = Color.Unspecified

the content color of this ElevatedToggleButton when checked.

outlinedToggleButtonColors

@Composable
fun outlinedToggleButtonColors(): ToggleButtonColors

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

outlinedToggleButtonColors

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

Parameters
containerColor: Color = Color.Unspecified

the container color of this OutlinedToggleButton when enabled.

contentColor: Color = Color.Unspecified

the content color of this OutlinedToggleButton when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this OutlinedToggleButton when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this OutlinedToggleButton when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this OutlinedToggleButton when checked.

checkedContentColor: Color = Color.Unspecified

the content color of this OutlinedToggleButton when checked.

shapes

@Composable
fun shapes(): ButtonShapes

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

shapes

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

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

Parameters
shape: Shape? = null

the unchecked shape for ButtonShapes

pressedShape: Shape? = null

the unchecked shape for ButtonShapes

checkedShape: Shape? = null

the unchecked shape for ButtonShapes

toggleButtonColors

@Composable
fun toggleButtonColors(): ToggleButtonColors

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

toggleButtonColors

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

Parameters
containerColor: Color = Color.Unspecified

the container color of this ToggleButton when enabled.

contentColor: Color = Color.Unspecified

the content color of this ToggleButton when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this ToggleButton when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this ToggleButton when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this ToggleButton when checked.

checkedContentColor: Color = Color.Unspecified

the content color of this ToggleButton when checked.

tonalToggleButtonColors

@Composable
fun tonalToggleButtonColors(): ToggleButtonColors

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

tonalToggleButtonColors

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

Parameters
containerColor: Color = Color.Unspecified

the container color of this TonalToggleButton when enabled.

contentColor: Color = Color.Unspecified

the content color of this TonalToggleButton when enabled.

disabledContainerColor: Color = Color.Unspecified

the container color of this TonalToggleButton when not enabled.

disabledContentColor: Color = Color.Unspecified

the content color of this TonalToggleButton when not enabled.

checkedContainerColor: Color = Color.Unspecified

the container color of this TonalToggleButton when checked.

checkedContentColor: Color = Color.Unspecified

the content color of this TonalToggleButton when checked.

Public properties

ContentPadding

val ContentPaddingPaddingValues

The default content padding used by all toglge buttons.

IconSize

val IconSizeDp

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

IconSpacing

val IconSpacingDp

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

LargeCheckedSquareShape

val LargeCheckedSquareShapeShape

The default checked square shape for a large toggle button

LargePressedShape

val LargePressedShapeShape

The default pressed shape for a large toggle button

LargeSquareShape

val LargeSquareShapeShape

The default square shape for a large toggle button

MediumCheckedSquareShape

val MediumCheckedSquareShapeShape

The default checked square shape for a medium toggle button

MediumPressedShape

val MediumPressedShapeShape

The default pressed shape for a medium toggle button

MediumSquareShape

val MediumSquareShapeShape

The default square shape for a medium toggle button

MinHeight

val MinHeightDp

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.

XLargeCheckedSquareShape

val XLargeCheckedSquareShapeShape

The default checked square shape for a extra large toggle button

XLargePressedShape

val XLargePressedShapeShape

The default pressed shape for a extra large toggle button

XLargeSquareShape

val XLargeSquareShapeShape

The default square shape for a extra large toggle button

XSmallCheckedSquareShape

val XSmallCheckedSquareShapeShape

The default checked square shape for a extra small toggle button

XSmallPressedShape

val XSmallPressedShapeShape

The default pressed shape for a extra small toggle button

XSmallSquareShape

val XSmallSquareShapeShape

The default square shape for a extra small toggle button

checkedShape

val checkedShapeShape

The default checked shape for ToggleButton

pressedShape

val pressedShapeShape

The default pressed shape for ToggleButton

roundShape

val roundShapeShape

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

shape

val shapeShape

The default unchecked shape for ToggleButton

squareShape

val squareShapeShape

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