---
title: "scale"
description: "Scale the contents of the composable by the following scale factors along the horizontal and vertical axis respectively."
type: "function"
lastmod: "2026-05-20T01:13:53.074285Z"
---
## API Reference

### scale

> Source set: Android

```kotlin
public fun RemoteModifier.scale(scaleX: RemoteFloat, scaleY: RemoteFloat): RemoteModifier
```

Scale the contents of the composable by the following scale factors along the horizontal and
vertical axis respectively. Negative scale factors can be used to mirror content across the
corresponding horizontal or vertical axis.

#### Parameters

| | |
| --- | --- |
| scaleX | Multiplier to scale content along the horizontal axis |
| scaleY | Multiplier to scale content along the vertical axis |

### scale

> Source set: Android

```kotlin
public fun RemoteModifier.scale(scale: RemoteFloat): RemoteModifier
```

Scale the contents of both the horizontal and vertical axis uniformly by the same scale factor.

#### Parameters

| | |
| --- | --- |
| scale | Multiplier to scale content along the horizontal and vertical axis |

## Code Examples
### ScaleNonUniformSample
```kotlin
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun ScaleNonUniformSample() {
    RemoteBox(RemoteModifier.scale(2f.rf, 3f.rf).size(100.rdp, 100.rdp).background(Color.Red))
}
```
### ScaleUniformSample
```kotlin
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun ScaleUniformSample() {
    RemoteBox(RemoteModifier.scale(2f.rf).size(100.rdp, 100.rdp).background(Color.Red))
}
```
