public object TextToggleButtonDefaults
Contains the default values used by TextToggleButton.
Functions
shapes
@Composable
public fun shapes(): TextToggleButtonShapes
Returns the default TextToggleButtonShapes for a TextToggleButton with a static shape.
shapes
@Composable
public fun shapes(shape: Shape): TextToggleButtonShapes
Returns a TextToggleButtonShapes for a TextToggleButton with a static shape.
Parameters
| shape | The normal shape of the TextToggleButton. |
animatedShapes
@Composable
public fun animatedShapes(): TextToggleButtonShapes
Returns the default TextToggleButtonShapes with an animation between two CornerBasedShapes when pressed.
A simple text toggle button using the default colors, animated when pressed.
animatedShapes
@Composable
public fun animatedShapes(
shape: CornerBasedShape? = null,
pressedShape: CornerBasedShape? = null,
): TextToggleButtonShapes
Returns a TextToggleButtonShapes with an animation between two CornerBasedShapes when pressed.
A simple text toggle button using the default colors, animated when pressed.
Parameters
| shape | The normal shape of the TextToggleButton - if null, the default TextToggleButtonDefaults.shape is used. |
| pressedShape | The pressed shape of the TextToggleButton if null, the default TextToggleButtonDefaults.pressedShape is used. |
variantAnimatedShapes
@Composable
public fun variantAnimatedShapes(): TextToggleButtonShapes
Returns the default TextToggleButtonShapes with an animation between three CornerSizes based on the pressed state and checked/unchecked.
A simple text toggle button using the default colors, animated on Press and Check/Uncheck:
variantAnimatedShapes
@Composable
public fun variantAnimatedShapes(
uncheckedShape: CornerBasedShape? = null,
checkedShape: CornerBasedShape? = null,
): TextToggleButtonShapes
Returns a TextToggleButtonShapes with an animation between three CornerSizes based on the pressed state and checked/unchecked.
A simple text toggle button using the default colors, animated on Press and Check/Uncheck:
Parameters
| uncheckedShape | the unchecked shape - if null, the default TextToggleButtonDefaults.shape is used. |
| checkedShape | the checked shape - if null, the default TextToggleButtonDefaults.checkedShape is used. |
colors
@Composable
public fun colors(): TextToggleButtonColors
Returns a TextToggleButtonColors for a TextToggleButton
- by default, a colored background with a contrasting content color. If the button is disabled, then the colors will have an alpha (
DisabledContainerAlphaorDisabledContentAlpha) value applied.
colors
@Composable
public fun colors(
checkedContainerColor: Color = Color.Unspecified,
checkedContentColor: Color = Color.Unspecified,
uncheckedContainerColor: Color = Color.Unspecified,
uncheckedContentColor: Color = Color.Unspecified,
disabledCheckedContainerColor: Color = Color.Unspecified,
disabledCheckedContentColor: Color = Color.Unspecified,
disabledUncheckedContainerColor: Color = Color.Unspecified,
disabledUncheckedContentColor: Color = Color.Unspecified,
): TextToggleButtonColors
Returns a TextToggleButtonColors for a TextToggleButton
- by default, a colored background with a contrasting content color. If the button is disabled, then the colors will have an alpha (
DisabledContainerAlphaorDisabledContentAlpha) value applied.
Parameters
| checkedContainerColor | the container color of this TextToggleButton when enabled and checked |
| checkedContentColor | the content color of this TextToggleButton when enabled and checked |
| uncheckedContainerColor | the container color of this TextToggleButton when enabled and unchecked |
| uncheckedContentColor | the content color of this TextToggleButton when enabled and unchecked |
| disabledCheckedContainerColor | the container color of this TextToggleButton when checked and not enabled |
| disabledCheckedContentColor | the content color of this TextToggleButton when checked and not enabled |
| disabledUncheckedContainerColor | the container color of this TextToggleButton when unchecked and not enabled |
| disabledUncheckedContentColor | the content color of this TextToggleButton when unchecked and not enabled |