SwitchButtonDefaults

object SwitchButtonDefaults


Contains the default values used by SwitchButtons and SplitSwitchButtons

Summary

Public functions

SplitSwitchButtonColors

Creates a SplitSwitchButtonColors for use in a SplitSwitchButton.

SplitSwitchButtonColors
@Composable
splitSwitchButtonColors(
    checkedContainerColor: Color,
    checkedContentColor: Color,
    checkedSecondaryContentColor: Color,
    checkedSplitContainerColor: Color,
    checkedThumbColor: Color,
    checkedThumbIconColor: Color,
    checkedTrackColor: Color,
    checkedTrackBorderColor: Color,
    uncheckedContainerColor: Color,
    uncheckedContentColor: Color,
    uncheckedSecondaryContentColor: Color,
    uncheckedSplitContainerColor: Color,
    uncheckedThumbColor: Color,
    uncheckedTrackColor: Color,
    uncheckedTrackBorderColor: Color,
    disabledCheckedContainerColor: Color,
    disabledCheckedContentColor: Color,
    disabledCheckedSecondaryContentColor: Color,
    disabledCheckedSplitContainerColor: Color,
    disabledCheckedThumbColor: Color,
    disabledCheckedThumbIconColor: Color,
    disabledCheckedTrackColor: Color,
    disabledCheckedTrackBorderColor: Color,
    disabledUncheckedContainerColor: Color,
    disabledUncheckedContentColor: Color,
    disabledUncheckedSecondaryContentColor: Color,
    disabledUncheckedSplitContainerColor: Color,
    disabledUncheckedThumbColor: Color,
    disabledUncheckedTrackBorderColor: Color
)

Creates a SplitSwitchButtonColors for use in a SplitSwitchButton.

SwitchButtonColors

Creates a SwitchButtonColors for use in a SwitchButton.

SwitchButtonColors
@Composable
switchButtonColors(
    checkedContainerColor: Color,
    checkedContentColor: Color,
    checkedSecondaryContentColor: Color,
    checkedIconColor: Color,
    checkedThumbColor: Color,
    checkedThumbIconColor: Color,
    checkedTrackColor: Color,
    checkedTrackBorderColor: Color,
    uncheckedContainerColor: Color,
    uncheckedContentColor: Color,
    uncheckedSecondaryContentColor: Color,
    uncheckedIconColor: Color,
    uncheckedThumbColor: Color,
    uncheckedTrackColor: Color,
    uncheckedTrackBorderColor: Color,
    disabledCheckedContainerColor: Color,
    disabledCheckedContentColor: Color,
    disabledCheckedSecondaryContentColor: Color,
    disabledCheckedIconColor: Color,
    disabledCheckedThumbColor: Color,
    disabledCheckedThumbIconColor: Color,
    disabledCheckedTrackColor: Color,
    disabledCheckedTrackBorderColor: Color,
    disabledUncheckedContainerColor: Color,
    disabledUncheckedContentColor: Color,
    disabledUncheckedSecondaryContentColor: Color,
    disabledUncheckedIconColor: Color,
    disabledUncheckedThumbColor: Color,
    disabledUncheckedTrackBorderColor: Color
)

Creates a SwitchButtonColors for use in a SwitchButton.

Public properties

PaddingValues

The default content padding used by SwitchButton

Shape

Recommended Shape for SplitSwitchButton.

Shape

Recommended Shape for SwitchButton.

Public functions

splitSwitchButtonColors

Added in 1.0.0-alpha30
@Composable
fun splitSwitchButtonColors(): SplitSwitchButtonColors

Creates a SplitSwitchButtonColors for use in a SplitSwitchButton.

splitSwitchButtonColors

@Composable
fun splitSwitchButtonColors(
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = Color.Unspecified,
    checkedSecondaryContentColor: Color = Color.Unspecified,
    checkedSplitContainerColor: Color = Color.Unspecified,
    checkedThumbColor: Color = Color.Unspecified,
    checkedThumbIconColor: Color = Color.Unspecified,
    checkedTrackColor: Color = Color.Unspecified,
    checkedTrackBorderColor: Color = Color.Unspecified,
    uncheckedContainerColor: Color = Color.Unspecified,
    uncheckedContentColor: Color = Color.Unspecified,
    uncheckedSecondaryContentColor: Color = Color.Unspecified,
    uncheckedSplitContainerColor: Color = Color.Unspecified,
    uncheckedThumbColor: Color = Color.Unspecified,
    uncheckedTrackColor: Color = Color.Unspecified,
    uncheckedTrackBorderColor: Color = Color.Unspecified,
    disabledCheckedContainerColor: Color = Color.Unspecified,
    disabledCheckedContentColor: Color = Color.Unspecified,
    disabledCheckedSecondaryContentColor: Color = Color.Unspecified,
    disabledCheckedSplitContainerColor: Color = Color.Unspecified,
    disabledCheckedThumbColor: Color = Color.Unspecified,
    disabledCheckedThumbIconColor: Color = Color.Unspecified,
    disabledCheckedTrackColor: Color = Color.Unspecified,
    disabledCheckedTrackBorderColor: Color = Color.Unspecified,
    disabledUncheckedContainerColor: Color = Color.Unspecified,
    disabledUncheckedContentColor: Color = Color.Unspecified,
    disabledUncheckedSecondaryContentColor: Color = Color.Unspecified,
    disabledUncheckedSplitContainerColor: Color = Color.Unspecified,
    disabledUncheckedThumbColor: Color = Color.Unspecified,
    disabledUncheckedTrackBorderColor: Color = Color.Unspecified
): SplitSwitchButtonColors

Creates a SplitSwitchButtonColors for use in a SplitSwitchButton.

Parameters
checkedContainerColor: Color = Color.Unspecified

The container color of the SplitSwitchButton when enabled and checked.

checkedContentColor: Color = Color.Unspecified

The content color of the SplitSwitchButton when enabled and checked.

checkedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of the SplitSwitchButton when enabled and checked, used for secondaryLabel content.

checkedSplitContainerColor: Color = Color.Unspecified

The split container color of the SplitSwitchButton when enabled and checked.

checkedThumbColor: Color = Color.Unspecified

The thumb color of the SplitSwitchButton when enabled and checked.

checkedThumbIconColor: Color = Color.Unspecified

The thumb icon color of the SplitSwitchButton when enabled and checked.

checkedTrackColor: Color = Color.Unspecified

The track color of the SplitSwitchButton when enabled and checked.

checkedTrackBorderColor: Color = Color.Unspecified

The track border color of the SplitSwitchButton when enabled and checked

uncheckedContainerColor: Color = Color.Unspecified

The container color of the SplitSwitchButton when enabled and unchecked.

uncheckedContentColor: Color = Color.Unspecified

The content color of the SplitSwitchButton when enabled and unchecked.

uncheckedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of the SplitSwitchButton when enabled and unchecked, used for secondaryLabel content.

uncheckedSplitContainerColor: Color = Color.Unspecified

The split container color of the SplitSwitchButton when enabled and unchecked.

uncheckedThumbColor: Color = Color.Unspecified

The thumb color of the SplitSwitchButton when enabled and unchecked.

uncheckedTrackColor: Color = Color.Unspecified

The track color of the SplitSwitchButton when enabled and unchecked.

uncheckedTrackBorderColor: Color = Color.Unspecified

The track border color of the SplitSwitchButton when enabled and unchecked

disabledCheckedContainerColor: Color = Color.Unspecified

The container color of the SplitSwitchButton when disabled and checked.

disabledCheckedContentColor: Color = Color.Unspecified

The content color of the SplitSwitchButton when disabled and checked.

disabledCheckedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of the SplitSwitchButton when disabled and checked, used for secondaryLabel content.

disabledCheckedSplitContainerColor: Color = Color.Unspecified

The split container color of the SplitSwitchButton when disabled and checked.

disabledCheckedThumbColor: Color = Color.Unspecified

The thumb color of the SplitSwitchButton when disabled and checked.

disabledCheckedThumbIconColor: Color = Color.Unspecified

The thumb icon color of the SplitSwitchButton when disabled and checked.

disabledCheckedTrackColor: Color = Color.Unspecified

The track color of the SplitSwitchButton when disabled and checked.

disabledCheckedTrackBorderColor: Color = Color.Unspecified

The track border color of the SplitSwitchButton when disabled and checked

disabledUncheckedContainerColor: Color = Color.Unspecified

The container color of the SplitSwitchButton when disabled and unchecked.

disabledUncheckedContentColor: Color = Color.Unspecified

The content color of the SplitSwitchButton when disabled and unchecked.

disabledUncheckedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of the SplitSwitchButton when disabled and unchecked, used for secondaryLabel content.

disabledUncheckedSplitContainerColor: Color = Color.Unspecified

The split container color of the SplitSwitchButton when disabled and unchecked.

disabledUncheckedThumbColor: Color = Color.Unspecified

The thumb color of the SplitSwitchButton when disabled and unchecked.

disabledUncheckedTrackBorderColor: Color = Color.Unspecified

The track border color of the SplitSwitchButton when disabled and unchecked

switchButtonColors

Added in 1.0.0-alpha30
@Composable
fun switchButtonColors(): SwitchButtonColors

Creates a SwitchButtonColors for use in a SwitchButton.

switchButtonColors

@Composable
fun switchButtonColors(
    checkedContainerColor: Color = Color.Unspecified,
    checkedContentColor: Color = Color.Unspecified,
    checkedSecondaryContentColor: Color = Color.Unspecified,
    checkedIconColor: Color = Color.Unspecified,
    checkedThumbColor: Color = Color.Unspecified,
    checkedThumbIconColor: Color = Color.Unspecified,
    checkedTrackColor: Color = Color.Unspecified,
    checkedTrackBorderColor: Color = Color.Unspecified,
    uncheckedContainerColor: Color = Color.Unspecified,
    uncheckedContentColor: Color = Color.Unspecified,
    uncheckedSecondaryContentColor: Color = Color.Unspecified,
    uncheckedIconColor: Color = Color.Unspecified,
    uncheckedThumbColor: Color = Color.Unspecified,
    uncheckedTrackColor: Color = Color.Unspecified,
    uncheckedTrackBorderColor: Color = Color.Unspecified,
    disabledCheckedContainerColor: Color = Color.Unspecified,
    disabledCheckedContentColor: Color = Color.Unspecified,
    disabledCheckedSecondaryContentColor: Color = Color.Unspecified,
    disabledCheckedIconColor: Color = Color.Unspecified,
    disabledCheckedThumbColor: Color = Color.Unspecified,
    disabledCheckedThumbIconColor: Color = Color.Unspecified,
    disabledCheckedTrackColor: Color = Color.Unspecified,
    disabledCheckedTrackBorderColor: Color = Color.Unspecified,
    disabledUncheckedContainerColor: Color = Color.Unspecified,
    disabledUncheckedContentColor: Color = Color.Unspecified,
    disabledUncheckedSecondaryContentColor: Color = Color.Unspecified,
    disabledUncheckedIconColor: Color = Color.Unspecified,
    disabledUncheckedThumbColor: Color = Color.Unspecified,
    disabledUncheckedTrackBorderColor: Color = Color.Unspecified
): SwitchButtonColors

Creates a SwitchButtonColors for use in a SwitchButton.

Parameters
checkedContainerColor: Color = Color.Unspecified

The container color of the SwitchButton when enabled and checked.

checkedContentColor: Color = Color.Unspecified

The content color of the SwitchButton when enabled and checked.

checkedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of the SwitchButton when enabled and checked, used for secondaryLabel content.

checkedIconColor: Color = Color.Unspecified

The icon color of the SwitchButton when enabled and checked.

checkedThumbColor: Color = Color.Unspecified

The thumb color of the SwitchButton when enabled and checked.

checkedThumbIconColor: Color = Color.Unspecified

The thumb icon color of the SwitchButton when enabled and checked.

checkedTrackColor: Color = Color.Unspecified

The track color of the SwitchButton when enabled and checked.

checkedTrackBorderColor: Color = Color.Unspecified

The track border color of the SwitchButton when enabled and checked

uncheckedContainerColor: Color = Color.Unspecified

The container color of the SwitchButton when enabled and unchecked.

uncheckedContentColor: Color = Color.Unspecified

The content color of a SwitchButton when enabled and unchecked.

uncheckedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of this SwitchButton when enabled and unchecked, used for secondaryLabel content

uncheckedIconColor: Color = Color.Unspecified

The icon color of the SwitchButton when enabled and unchecked.

uncheckedThumbColor: Color = Color.Unspecified

The thumb color of the SwitchButton when enabled and unchecked.

uncheckedTrackColor: Color = Color.Unspecified

The track color of the SwitchButton when enabled and unchecked.

uncheckedTrackBorderColor: Color = Color.Unspecified

The track border color of the SwitchButton when enabled and unchecked

disabledCheckedContainerColor: Color = Color.Unspecified

The container color of the SwitchButton when disabled and checked.

disabledCheckedContentColor: Color = Color.Unspecified

The content color of the SwitchButton when disabled and checked.

disabledCheckedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of the SwitchButton when disabled and checked, used for secondaryLabel content.

disabledCheckedIconColor: Color = Color.Unspecified

The icon color of the SwitchButton when disabled and checked.

disabledCheckedThumbColor: Color = Color.Unspecified

The thumb color of the SwitchButton when disabled and checked.

disabledCheckedThumbIconColor: Color = Color.Unspecified

The thumb icon color of the SwitchButton when disabled and checked.

disabledCheckedTrackColor: Color = Color.Unspecified

The track color of the SwitchButton when disabled and checked.

disabledCheckedTrackBorderColor: Color = Color.Unspecified

The track border color of the SwitchButton when disabled and checked

disabledUncheckedContainerColor: Color = Color.Unspecified

The container color of the SwitchButton when disabled and unchecked.

disabledUncheckedContentColor: Color = Color.Unspecified

The content color of a SwitchButton when disabled and unchecked.

disabledUncheckedSecondaryContentColor: Color = Color.Unspecified

The secondary content color of this SwitchButton when disabled and unchecked, used for secondaryLabel content

disabledUncheckedIconColor: Color = Color.Unspecified

The icon color of the SwitchButton when disabled and unchecked.

disabledUncheckedThumbColor: Color = Color.Unspecified

The thumb color of the SwitchButton when disabled and unchecked.

disabledUncheckedTrackBorderColor: Color = Color.Unspecified

The track border color of the SwitchButton when disabled and unchecked

Public properties

ContentPadding

Added in 1.0.0-alpha30
val ContentPaddingPaddingValues

The default content padding used by SwitchButton

splitSwitchButtonShape

Added in 1.0.0-alpha30
val splitSwitchButtonShapeShape

Recommended Shape for SplitSwitchButton.

switchButtonShape

Added in 1.0.0-alpha30
val switchButtonShapeShape

Recommended Shape for SwitchButton.