---
title: "ButtonShapes"
description: "The shapes that will be used in buttons. Button will morph between these shapes depending on the
interaction of the 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 ButtonShapes(val shape: Shape, val pressedShape: Shape)
```


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


## Functions

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


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



