Compose Unstyled 2.0 is out! Check the official announcement blog ->
Function

maxSize

Constrains the maximum size (width and height) of the component.

maxSize

Source set: Common
@ExperimentalFoundationStyleApi
fun MaxSizeScope.maxSize(size: DpSize)

Constrains the maximum size (width and height) of the component. The component's dimensions, including padding, will be at most these values.

This property is not inherited

Parameters

size The maximum size (DpSize).

maxSize

Source set: Common
@ExperimentalFoundationStyleApi
fun MaxSizeScope.maxSize(width: Dp, height: Dp)

Constrains the maximum width and height of the component. The component's dimensions, including padding, will be at most these values.

This property is not inherited

Parameters

width The maximum width.
height The maximum height.

Last updated: