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

```kotlin
object ButtonDefaults
```

Contains the default values used by [Button](/jetpack-compose/androidx.compose.material/material/components/Button)

## Properties

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

```kotlin
val ContentPadding =
    PaddingValues(
        start = ButtonHorizontalPadding,
        top = ButtonVerticalPadding,
        end = ButtonHorizontalPadding,
        bottom = ButtonVerticalPadding,
    )
```

The default content padding used by [Button](/jetpack-compose/androidx.compose.material/material/components/Button)

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

```kotlin
val MinWidth = 64.dp
```

The default min width applied for the [Button](/jetpack-compose/androidx.compose.material/material/components/Button). Note that you can override it by applying
Modifier.widthIn directly on [Button](/jetpack-compose/androidx.compose.material/material/components/Button).

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

```kotlin
val MinHeight = 36.dp
```

The default min height applied for the [Button](/jetpack-compose/androidx.compose.material/material/components/Button). Note that you can override it by applying
Modifier.heightIn directly on [Button](/jetpack-compose/androidx.compose.material/material/components/Button).

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

```kotlin
val IconSize = 18.dp
```

The default size of the icon when used inside a [Button](/jetpack-compose/androidx.compose.material/material/components/Button).

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

```kotlin
val IconSpacing = 8.dp
```

The default size of the spacing between an icon and a text when they used inside a [Button](/jetpack-compose/androidx.compose.material/material/components/Button).

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

```kotlin
const val OutlinedBorderOpacity = 0.12f
```

The default color opacity used for an [OutlinedButton](/jetpack-compose/androidx.compose.material/material/components/OutlinedButton)'s border color

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

```kotlin
val OutlinedBorderSize = 1.dp
```

The default [OutlinedButton](/jetpack-compose/androidx.compose.material/material/components/OutlinedButton)'s border size

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

```kotlin
val outlinedBorder: BorderStroke
```

The default disabled content color used by all types of [Button](/jetpack-compose/androidx.compose.material/material/components/Button)s

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

```kotlin
val TextButtonContentPadding =
    PaddingValues(
        start = TextButtonHorizontalPadding,
        top = ContentPadding.calculateTopPadding(),
        end = TextButtonHorizontalPadding,
        bottom = ContentPadding.calculateBottomPadding(),
    )
```

The default content padding used by [TextButton](/jetpack-compose/androidx.compose.material/material/components/TextButton)

## Functions

<h2 id="elevation-defaultelevation-pressedelevation-disabledelevation">elevation</h2>

```kotlin
@Composable
    fun elevation(
        defaultElevation: Dp = 2.dp,
        pressedElevation: Dp = 8.dp,
        disabledElevation: Dp = 0.dp,
    ): ButtonElevation
```

Creates a [ButtonElevation](/jetpack-compose/androidx.compose.material/material/interfaces/ButtonElevation) that will animate between the provided values according to the
Material specification for a [Button](/jetpack-compose/androidx.compose.material/material/components/Button).

#### Parameters

| | |
| --- | --- |
| defaultElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is enabled, and has no other [Interaction](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/Interaction)s. |
| pressedElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is enabled and is pressed. |
| disabledElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is not enabled. |

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

<h2 id="elevation-defaultelevation-pressedelevation-disabledelevation-hoveredelevation-focusedelevation">elevation</h2>

```kotlin
@Composable
    fun elevation(
        defaultElevation: Dp = 2.dp,
        pressedElevation: Dp = 8.dp,
        disabledElevation: Dp = 0.dp,
        hoveredElevation: Dp = 4.dp,
        focusedElevation: Dp = 4.dp,
    ): ButtonElevation
```

Creates a [ButtonElevation](/jetpack-compose/androidx.compose.material/material/interfaces/ButtonElevation) that will animate between the provided values according to the
Material specification for a [Button](/jetpack-compose/androidx.compose.material/material/components/Button).

#### Parameters

| | |
| --- | --- |
| defaultElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is enabled, and has no other [Interaction](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/Interaction)s. |
| pressedElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is enabled and is pressed. |
| disabledElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is not enabled. |
| hoveredElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is enabled and is hovered. |
| focusedElevation | the elevation to use when the [Button](/jetpack-compose/androidx.compose.material/material/components/Button) is enabled and is focused. |

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

<h2 id="buttoncolors-backgroundcolor-contentcolor-disabledbackgroundcolor-disabledcontentcolor">buttonColors</h2>

```kotlin
@Composable
    fun buttonColors(
        backgroundColor: Color = MaterialTheme.colors.primary,
        contentColor: Color = contentColorFor(backgroundColor),
        disabledBackgroundColor: Color =
            MaterialTheme.colors.onSurface
                .copy(alpha = 0.12f)
                .compositeOver(MaterialTheme.colors.surface),
        disabledContentColor: Color =
            MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled),
    ): ButtonColors
```

Creates a [ButtonColors](/jetpack-compose/androidx.compose.material/material/interfaces/ButtonColors) that represents the default background and content colors used in a
[Button](/jetpack-compose/androidx.compose.material/material/components/Button).

#### Parameters

| | |
| --- | --- |
| backgroundColor | the background color of this [Button](/jetpack-compose/androidx.compose.material/material/components/Button) when enabled |
| contentColor | the content color of this [Button](/jetpack-compose/androidx.compose.material/material/components/Button) when enabled |
| disabledBackgroundColor | the background color of this [Button](/jetpack-compose/androidx.compose.material/material/components/Button) when not enabled |
| disabledContentColor | the content color of this [Button](/jetpack-compose/androidx.compose.material/material/components/Button) when not enabled |

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

<h2 id="outlinedbuttoncolors-backgroundcolor-contentcolor-disabledcontentcolor">outlinedButtonColors</h2>

```kotlin
@Composable
    fun outlinedButtonColors(
        backgroundColor: Color = MaterialTheme.colors.surface,
        contentColor: Color = MaterialTheme.colors.primary,
        disabledContentColor: Color =
            MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled),
    ): ButtonColors
```

Creates a [ButtonColors](/jetpack-compose/androidx.compose.material/material/interfaces/ButtonColors) that represents the default background and content colors used in an
[OutlinedButton](/jetpack-compose/androidx.compose.material/material/components/OutlinedButton).

#### Parameters

| | |
| --- | --- |
| backgroundColor | the background color of this [OutlinedButton](/jetpack-compose/androidx.compose.material/material/components/OutlinedButton) |
| contentColor | the content color of this [OutlinedButton](/jetpack-compose/androidx.compose.material/material/components/OutlinedButton) when enabled |
| disabledContentColor | the content color of this [OutlinedButton](/jetpack-compose/androidx.compose.material/material/components/OutlinedButton) when not enabled |

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

<h2 id="textbuttoncolors-backgroundcolor-contentcolor-disabledcontentcolor">textButtonColors</h2>

```kotlin
@Composable
    fun textButtonColors(
        backgroundColor: Color = Color.Transparent,
        contentColor: Color = MaterialTheme.colors.primary,
        disabledContentColor: Color =
            MaterialTheme.colors.onSurface.copy(alpha = ContentAlpha.disabled),
    ): ButtonColors
```

Creates a [ButtonColors](/jetpack-compose/androidx.compose.material/material/interfaces/ButtonColors) that represents the default background and content colors used in a
[TextButton](/jetpack-compose/androidx.compose.material/material/components/TextButton).

#### Parameters

| | |
| --- | --- |
| backgroundColor | the background color of this [TextButton](/jetpack-compose/androidx.compose.material/material/components/TextButton) |
| contentColor | the content color of this [TextButton](/jetpack-compose/androidx.compose.material/material/components/TextButton) when enabled |
| disabledContentColor | the content color of this [TextButton](/jetpack-compose/androidx.compose.material/material/components/TextButton) when not enabled |