---
title: "ToggleButtonShapes"
description: "The shapes that will be used in toggle buttons. Toggle button will morph between these three
shapes depending on the interaction of the toggle button, assuming all of the shapes are
[CornerBasedShape]s."
type: "class"
---

<div class='type'>Class</div>


<a id='references'></a>

<div class='sourceset sourceset-common'>Common</div>


```kotlin
@ExperimentalMaterial3ExpressiveApi
class ToggleButtonShapes(val shape: Shape, val pressedShape: Shape, val checkedShape: Shape)
```


The shapes that will be used in toggle buttons. Toggle button will morph between these three
shapes depending on the interaction of the toggle button, assuming all of the shapes are
`CornerBasedShape`s.


## Functions

```kotlin
fun copy(
        shape: Shape? = this.shape,
        pressedShape: Shape? = this.pressedShape,
        checkedShape: Shape? = this.checkedShape,
    ) =
        ToggleButtonShapes(
            shape = shape.takeOrElse { this.shape },
            pressedShape = pressedShape.takeOrElse { this.pressedShape },
            checkedShape = checkedShape.takeOrElse { this.checkedShape },
        )
```


Returns a copy of this ToggleButtonShapes, optionally overriding some of the values.



