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

MaxSizeScope

An interface that introduces maxWidth and maxHeight properties to a Style receiver scope.

Source set: Common
@ExperimentalFoundationStyleApi
interface MaxSizeScope

An interface that introduces maxWidth and maxHeight properties to a Style receiver scope.

Functions

maxWidth

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

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.

Last updated: