<h2 id="absolutepadding-left-top-right-bottom-front-back">absolutePadding</h2>

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

```kotlin
public fun SubspaceModifier.absolutePadding(
    left: Dp = 0.dp,
    top: Dp = 0.dp,
    right: Dp = 0.dp,
    bottom: Dp = 0.dp,
    front: Dp = 0.dp,
    back: Dp = 0.dp,
): SubspaceModifier
```

Apply additional space along each edge of the content in [Dp](/jetpack-compose/androidx.compose.ui/ui-unit/classes/Dp): [left](/jetpack-compose/androidx.compose.ui/ui-test/properties/left), [top](/jetpack-compose/androidx.compose.ui/ui-test/properties/top), [right](/jetpack-compose/androidx.compose.ui/ui-test/properties/right), [bottom](/jetpack-compose/androidx.compose.ui/ui-test/properties/bottom),
`front` and `back`. Padding is applied before content measurement and takes precedence; content
may only be as large as the remaining space. To apply relative padding with layout direction, see
[padding](/jetpack-compose/androidx.xr.compose/compose/functions/padding).

Negative padding is not permitted — it will cause `IllegalArgumentException`.

#### Parameters

| | |
| --- | --- |
| left | The amount of space at the left edge of the content. |
| top | The amount of space at the top edge of the content. |
| right | The amount of space at the right edge of the content. |
| bottom | The amount of space at the bottom edge of the content. |
| front | The amount of space at the front edge of the content. |
| back | The amount of space at the back edge of the content. |