---
title: "MaxSizeScope"
description: "An interface that introduces maxWidth and maxHeight properties to a Style receiver scope."
type: "interface"
lastmod: "2026-05-20T01:13:53.377368Z"
---
## API Reference

> Source set: Common

```kotlin
@ExperimentalFoundationStyleApi
interface MaxSizeScope
```

An interface that introduces [maxWidth](#maxwidth) and [maxHeight](#maxheight) properties to a [Style](/jetpack-compose/androidx.compose.foundation/foundation/interfaces/Style) receiver scope.

## Functions

### maxWidth

```kotlin
fun maxWidth(value: Dp)
```

Constrains the maximum width of the component. The component's width, including padding, will
be at most this value.

This property is *not* inherited

#### Parameters

| | |
| --- | --- |
| value | The maximum width. |

### maxHeight

```kotlin
fun maxHeight(value: Dp)
```

Constrains the maximum height of the component. The component's height, including padding,
will be at most this value.

This property is *not* inherited

#### Parameters

| | |
| --- | --- |
| value | The maximum height. |
