<div class='type'>Composable Component</div>



Wear Material `CompactButton` that offers a single slot to take any content (text, icon or
image).

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

<div class='sourceset sourceset-android'>Android</div>


> **Deprecated** This overload is provided for backwards compatibility with Compose for Wear OS 1.0.A newer overload is available with an additional shape parameter.



<h2 id="compactbutton-onclick-modifier-enabled-colors-backgroundpadding-interactionsource-content">CompactButton</h2>

```kotlin
@Composable
public fun CompactButton(
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    colors: ButtonColors = ButtonDefaults.primaryButtonColors(),
    backgroundPadding: Dp = ButtonDefaults.CompactButtonBackgroundPadding,
    interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
    content: @Composable BoxScope.() -> Unit,
): Unit
```


#### Parameters

| | |
| --- | --- |
| onClick | Will be called when the user clicks the button. |
| modifier | Modifier to be applied to the button. |
| enabled | Controls the enabled state of the button. When `false`, this button will not be clickable. |
| colors | `ButtonColors` that will be used to resolve the background and content color for this button in different states. See `ButtonDefaults.buttonColors`. |
| backgroundPadding | Increases the transparent clickable area around the background, defaults to `ButtonDefaults.CompactButtonBackgroundPadding` |
| interactionSource | The `MutableInteractionSource` representing the stream of `Interaction`s for this Button. You can create and pass in your own remembered `MutableInteractionSource` if you want to observe `Interaction`s and customize the appearance / behavior of this Button in different `Interaction`s. |
| content | The content displayed on the `CompactButton` such as text, icon or image. |






<hr class="docs-overload-divider">


<h2 id="compactbutton-onclick-modifier-enabled-colors-backgroundpadding-interactionsource-shape-border-content">CompactButton</h2>

<div class='sourceset sourceset-android'>Android</div>


```kotlin
@Composable
public fun CompactButton(
    onClick: () -> Unit,
    modifier: Modifier = Modifier,
    enabled: Boolean = true,
    colors: ButtonColors = ButtonDefaults.primaryButtonColors(),
    backgroundPadding: Dp = ButtonDefaults.CompactButtonBackgroundPadding,
    interactionSource: MutableInteractionSource? = null,
    shape: Shape = CircleShape,
    border: ButtonBorder = ButtonDefaults.buttonBorder(),
    content: @Composable BoxScope.() -> Unit,
)
```


#### Parameters

| | |
| --- | --- |
| onClick | Will be called when the user clicks the button. |
| modifier | Modifier to be applied to the button. |
| enabled | Controls the enabled state of the button. When `false`, this button will not be clickable. |
| colors | `ButtonColors` that will be used to resolve the background and content color for this button in different states. See `ButtonDefaults.buttonColors`. |
| backgroundPadding | Increases the transparent clickable area around the background, defaults to `ButtonDefaults.CompactButtonBackgroundPadding` |
| interactionSource | an optional hoisted `MutableInteractionSource` for observing and emitting `Interaction`s for this button. You can use this to change the button's appearance or preview the button in different states. Note that if `null` is provided, interactions will still happen internally. |
| shape | Defines the button's shape. It is strongly recommended to use the default as this shape is a key characteristic of the Wear Material Theme. |
| border | `ButtonBorder` that will be used to resolve the button border in different states. See `ButtonDefaults.outlinedButtonBorder`. |
| content | The content displayed on the `CompactButton` such as text, icon or image. |