---
title: "transformingResizable"
description: "When the resizable modifier is present and enabled, UI controls will be shown that allow the user to resize the element in 3D space."
type: "function"
lastmod: "2026-06-18T10:32:52.919912Z"
---
## API Reference

### transformingResizable

> Source set: Android

```kotlin
public fun SubspaceModifier.transformingResizable(
    enabled: Boolean = true,
    minimumSize: DpVolumeSize = DpVolumeSize.Zero,
    maximumSize: DpVolumeSize = DpVolumeSize(Dp.Infinity, Dp.Infinity, Dp.Infinity),
    maintainAspectRatio: Boolean = false,
    onResize: (SpatialResizeEvent) -> Unit = {},
): SubspaceModifier
```

When the resizable modifier is present and enabled, UI controls will be shown that allow the user
to resize the element in 3D space. The final transform of the attached Composable will be set by
the system. The resize affordance will not curve and thus adding it to a Composable with
curvature like [SpatialCurvedRow](/jetpack-compose/androidx.xr.compose/compose/composable-functions/SpatialCurvedRow) is not recommended.

#### Parameters

| | |
| --- | --- |
| enabled | Whether resizing is enabled for this object. If `false`, the object cannot be resized. Changing the [enabled](/jetpack-compose/androidx.compose.remote/remote-creation-compose/properties/enabled) state of the modifier does not clear the user resize state; whereas, removing the modifier will reset the user resize state, causing the object to revert to its layout size. |
| minimumSize | The minimum allowable size for the object, represented by a [DpVolumeSize](/jetpack-compose/androidx.xr.compose/compose/classes/DpVolumeSize). The object cannot be scaled down beyond these dimensions. Defaults to `DpVolumeSize.Zero`. |
| maximumSize | The maximum allowable size for the object, represented by a [DpVolumeSize](/jetpack-compose/androidx.xr.compose/compose/classes/DpVolumeSize). The object cannot be scaled up beyond these dimensions. Defaults to a [DpVolumeSize](/jetpack-compose/androidx.xr.compose/compose/classes/DpVolumeSize) with all dimensions set to `Dp.Infinity`, meaning no upper limit by default. |
| maintainAspectRatio | If `true`, the object's aspect ratio (proportions) will be preserved during resizing. If `false`, individual dimensions can be changed independently. |
| onResize | Optional observer callback invoked during the manipulation to observe resize events through [SpatialResizeEvent](/jetpack-compose/androidx.xr.compose/compose/classes/SpatialResizeEvent). Since the system automatically applies the resize, this callback is strictly for monitoring changes and does not control the size. |

## Code Examples
### BasicTransformingResizableSample
```kotlin
/** A sample demonstrating a simple resizable component where the system manages the layout. */
@SubspaceComposable
@Composable
public fun BasicTransformingResizableSample() {
    SpatialPanel(
        modifier =
            SubspaceModifier.transformingResizable(
                minimumSize = DpVolumeSize(100.dp, 100.dp, 0.dp),
                maximumSize = DpVolumeSize(800.dp, 800.dp, 0.dp),
            )
    ) {
        Text("Transforming Resizable")
    }
}
```
