# PaddingValues

Artifact: [androidx.compose.foundation:foundation-layout](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/layout/Padding.kt+class:androidx.compose.foundation.layout.PaddingValues) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0) Common/AllAndroid/JVM
- Cmn

  ```
  interface PaddingValues
  ```
Known direct subclasses [PaddingValues.Absolute](https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.Absolute)

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.Absolute` | Describes an absolute (RTL unaware) padding to be applied along the edges inside a box. |

*** ** * ** ***

Describes a padding to be applied along the edges inside a box. See the `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` factories and `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.Absolute` for convenient ways to build `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues`.

## Summary

| ### Nested types |
|---|
| `class https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.Absolute : https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` Describes an absolute (RTL unaware) padding to be applied along the edges inside a box. |

| ### Public companion properties |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#Zero()` PaddingValues with all values `0.dp`. | Cmn |

| ### Public functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#calculateBottomPadding()()` The padding to be applied along the bottom edge inside a box. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#calculateLeftPadding(androidx.compose.ui.unit.LayoutDirection)(layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` The padding to be applied along the left edge inside a box. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#calculateRightPadding(androidx.compose.ui.unit.LayoutDirection)(layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` The padding to be applied along the right edge inside a box. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#calculateTopPadding()()` The padding to be applied along the top edge inside a box. | Cmn |

| ### Extension functions |
|---|---|---|
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#(androidx.compose.foundation.layout.PaddingValues).calculateEndPadding(androidx.compose.ui.unit.LayoutDirection)(layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL. | Cmn |
| `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#(androidx.compose.foundation.layout.PaddingValues).calculateStartPadding(androidx.compose.ui.unit.LayoutDirection)(layoutDirection: https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/LayoutDirection)` The padding to be applied along the start edge inside a box: along the left edge if the layout direction is LTR, or along the right edge for RTL. | Cmn |
| `operator https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#(androidx.compose.foundation.layout.PaddingValues).minus(androidx.compose.foundation.layout.PaddingValues)(other: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues)` Subtracts a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` from another one and ensures that the result is non-negative. | Cmn |
| `operator https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` | `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues.https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues#(androidx.compose.foundation.layout.PaddingValues).plus(androidx.compose.foundation.layout.PaddingValues)(other: https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues)` Adds two `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` together. | Cmn |

## Public companion properties

### Zero

Cmn Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.9.0)

```
val Zero: PaddingValues
```

PaddingValues with all values `0.dp`.

## Public functions

### calculateBottomPadding

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
fun calculateBottomPadding(): Dp
```

The padding to be applied along the bottom edge inside a box.

### calculateLeftPadding

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
fun calculateLeftPadding(layoutDirection: LayoutDirection): Dp
```

The padding to be applied along the left edge inside a box.

### calculateRightPadding

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
fun calculateRightPadding(layoutDirection: LayoutDirection): Dp
```

The padding to be applied along the right edge inside a box.

### calculateTopPadding

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.0.0)

```
fun calculateTopPadding(): Dp
```

The padding to be applied along the top edge inside a box.

## Extension functions

### PaddingValues.calculateEndPadding

Cmn Artifact: [androidx.compose.foundation:foundation-layout](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/layout/Padding.kt+function:calculateEndPadding)

```
fun PaddingValues.calculateEndPadding(layoutDirection: LayoutDirection): Dp
```

The padding to be applied along the end edge inside a box: along the right edge if the layout direction is LTR, or along the left edge for RTL.

### PaddingValues.calculateStartPadding

Cmn Artifact: [androidx.compose.foundation:foundation-layout](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/layout/Padding.kt+function:calculateStartPadding)

```
fun PaddingValues.calculateStartPadding(layoutDirection: LayoutDirection): Dp
```

The padding to be applied along the start edge inside a box: along the left edge if the layout direction is LTR, or along the right edge for RTL.

### PaddingValues.minus

Cmn Artifact: [androidx.compose.foundation:foundation-layout](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/layout/Padding.kt+function:minus)

```
operator fun PaddingValues.minus(other: PaddingValues): PaddingValues
```

Subtracts a `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` from another one and ensures that the result is non-negative.

### PaddingValues.plus

Cmn Artifact: [androidx.compose.foundation:foundation-layout](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/layout/Padding.kt+function:plus)

```
operator fun PaddingValues.plus(other: PaddingValues): PaddingValues
```

Adds two `https://developer.android.com/reference/kotlin/androidx/compose/foundation/layout/PaddingValues` together.