# TextToggleButtonDefaults

Artifact: [androidx.wear.compose:compose-material3](https://developer.android.com/jetpack/androidx/releases/wear-compose) [View Source](https://cs.android.com/search?q=file:androidx/wear/compose/material3/TextToggleButton.kt+class:androidx.wear.compose.material3.TextToggleButtonDefaults) Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)


```
object TextToggleButtonDefaults
```

<br />

*** ** * ** ***

Contains the default values used by `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#animatedShapes()()` Returns the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between two CornerBasedShapes when pressed. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#animatedShapes(androidx.compose.foundation.shape.CornerBasedShape,androidx.compose.foundation.shape.CornerBasedShape)(shape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape?, pressedShape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape?)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between two CornerBasedShapes when pressed. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonColors` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#colors()()` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonColors` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonColors` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#colors(androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color)( checkedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, checkedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, uncheckedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, uncheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledCheckedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledCheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledUncheckedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color, disabledUncheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color )` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonColors` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#shapes()()` Returns the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` with a static shape. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#shapes(androidx.compose.ui.graphics.Shape)(shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape)` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` with a static shape. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#variantAnimatedShapes()()` Returns the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between three `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize`s based on the pressed state and checked/unchecked. |
| `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` | `@https://developer.android.com/reference/kotlin/androidx/compose/runtime/Composable https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#variantAnimatedShapes(androidx.compose.foundation.shape.CornerBasedShape,androidx.compose.foundation.shape.CornerBasedShape)( uncheckedShape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape?, checkedShape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape? )` Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between three `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize`s based on the pressed state and checked/unchecked. |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#ExtraLargeSize()` The recommended size for an extra large text toggle button. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#LargeSize()` The recommended size for a large text toggle button. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#Size()` The default size applied for text toggle buttons. |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#checkedShape()` Recommended checked `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#extraLargeTextStyle()` The recommended text style for an extra large text toggle button. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#largeTextStyle()` The recommended text style for a large text toggle button. |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#pressedShape()` Recommended pressed `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/RoundedCornerShape` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#shape()` Recommended `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`. |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/text/TextStyle` | `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#textStyle()` The default text style applied for text toggle buttons. |

## Public functions

### animatedShapes

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun animatedShapes(): TextToggleButtonShapes
```

Returns the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between two CornerBasedShapes when pressed.

A simple text toggle button using the default colors, animated when pressed.

```kotlin
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.TextToggleButton
import androidx.wear.compose.material3.TextToggleButtonDefaults

var checked by remember { mutableStateOf(true) }
TextToggleButton(
    checked = checked,
    onCheckedChange = { checked = !checked },
    shapes = TextToggleButtonDefaults.animatedShapes(),
) {
    Text(text = if (checked) "On" else "Off")
}
```

### animatedShapes

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun animatedShapes(
    shape: CornerBasedShape? = null,
    pressedShape: CornerBasedShape? = null
): TextToggleButtonShapes
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between two CornerBasedShapes when pressed.

A simple text toggle button using the default colors, animated when pressed.

```kotlin
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.TextToggleButton
import androidx.wear.compose.material3.TextToggleButtonDefaults

var checked by remember { mutableStateOf(true) }
TextToggleButton(
    checked = checked,
    onCheckedChange = { checked = !checked },
    shapes = TextToggleButtonDefaults.animatedShapes(),
) {
    Text(text = if (checked) "On" else "Off")
}
```

| Parameters |
|---|---|
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape? = null` | The normal shape of the TextToggleButton - if null, the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#shape()` is used. |
| `pressedShape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape? = null` | The pressed shape of the TextToggleButton if null, the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#pressedShape()` is used. |

### colors

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun colors(): TextToggleButtonColors
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonColors` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`

- by default, a colored background with a contrasting content color. If the button is disabled, then the colors will have an alpha (`https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#DisabledContainerAlpha()` or `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#DisabledContentAlpha()`) value applied.

### colors

Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.6.0)

```
@Composable
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 `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonColors` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`

- by default, a colored background with a contrasting content color. If the button is disabled, then the colors will have an alpha (`https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#DisabledContainerAlpha()` or `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/package-summary#DisabledContentAlpha()`) value applied.

| Parameters |
|---|---|
| `checkedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the container color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when enabled and checked |
| `checkedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the content color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when enabled and checked |
| `uncheckedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the container color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when enabled and unchecked |
| `uncheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the content color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when enabled and unchecked |
| `disabledCheckedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the container color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when checked and not enabled |
| `disabledCheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the content color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when checked and not enabled |
| `disabledUncheckedContainerColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the container color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when unchecked and not enabled |
| `disabledUncheckedContentColor: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Color = Color.Unspecified` | the content color of this `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` when unchecked and not enabled |

### shapes

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun shapes(): TextToggleButtonShapes
```

Returns the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` with a static shape.

### shapes

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun shapes(shape: Shape): TextToggleButtonShapes
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` for a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)` with a static shape.

| Parameters |
|---|---|
| `shape: https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` | The normal shape of the TextToggleButton. |

### variantAnimatedShapes

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun variantAnimatedShapes(): TextToggleButtonShapes
```

Returns the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between three `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize`s based on the pressed state and checked/unchecked.

A simple text toggle button using the default colors, animated on Press and Check/Uncheck:

```kotlin
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.TextToggleButton
import androidx.wear.compose.material3.TextToggleButtonDefaults

var checked by remember { mutableStateOf(true) }
TextToggleButton(
    checked = checked,
    onCheckedChange = { checked = !checked },
    shapes = TextToggleButtonDefaults.variantAnimatedShapes(),
) {
    Text(text = if (checked) "On" else "Off")
}
```

### variantAnimatedShapes

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
@Composable
fun variantAnimatedShapes(
    uncheckedShape: CornerBasedShape? = null,
    checkedShape: CornerBasedShape? = null
): TextToggleButtonShapes
```

Returns a `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonShapes` with an animation between three `https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerSize`s based on the pressed state and checked/unchecked.

A simple text toggle button using the default colors, animated on Press and Check/Uncheck:

```kotlin
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.wear.compose.material3.Text
import androidx.wear.compose.material3.TextToggleButton
import androidx.wear.compose.material3.TextToggleButtonDefaults

var checked by remember { mutableStateOf(true) }
TextToggleButton(
    checked = checked,
    onCheckedChange = { checked = !checked },
    shapes = TextToggleButtonDefaults.variantAnimatedShapes(),
) {
    Text(text = if (checked) "On" else "Off")
}
```

| Parameters |
|---|---|
| `uncheckedShape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape? = null` | the unchecked shape - if null, the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#shape()` is used. |
| `checkedShape: https://developer.android.com/reference/kotlin/androidx/compose/foundation/shape/CornerBasedShape? = null` | the checked shape - if null, the default `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButtonDefaults#checkedShape()` is used. |

## Public properties

### ExtraLargeSize

```
val ExtraLargeSize: Dp
```

The recommended size for an extra large text toggle button. It is recommended to apply this size using `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/touchTargetAwareSize.modifier#(androidx.compose.ui.Modifier).touchTargetAwareSize(androidx.compose.ui.unit.Dp)`.

### LargeSize

```
val LargeSize: Dp
```

The recommended size for a large text toggle button. It is recommended to apply this size using `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/touchTargetAwareSize.modifier#(androidx.compose.ui.Modifier).touchTargetAwareSize(androidx.compose.ui.unit.Dp)`.

### Size

```
val Size: Dp
```

The default size applied for text toggle buttons. It is recommended to apply this size using `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/touchTargetAwareSize.modifier#(androidx.compose.ui.Modifier).touchTargetAwareSize(androidx.compose.ui.unit.Dp)`.

### checkedShape

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
val checkedShape: CornerBasedShape
```

Recommended checked `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`.

### extraLargeTextStyle

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
val extraLargeTextStyle: TextStyle
```

The recommended text style for an extra large text toggle button.

### largeTextStyle

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
val largeTextStyle: TextStyle
```

The recommended text style for a large text toggle button.

### pressedShape

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
val pressedShape: CornerBasedShape
```

Recommended pressed `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`.

### shape

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
val shape: RoundedCornerShape
```

Recommended `https://developer.android.com/reference/kotlin/androidx/compose/ui/graphics/Shape` for `https://developer.android.com/reference/kotlin/androidx/wear/compose/material3/TextToggleButton.composable#TextToggleButton(kotlin.Boolean,kotlin.Function1,androidx.compose.ui.Modifier,kotlin.Boolean,androidx.wear.compose.material3.TextToggleButtonColors,androidx.compose.foundation.interaction.MutableInteractionSource,androidx.wear.compose.material3.TextToggleButtonShapes,androidx.compose.foundation.BorderStroke,kotlin.Function1)`.

### textStyle

Added in [1.5.0](https://developer.android.com/jetpack/androidx/releases/wear-compose#1.5.0)

```
val textStyle: TextStyle
```

The default text style applied for text toggle buttons.