🌈 Create new beautiful Compose Gradients with our new wesite ->
Interface

SizeScope

An interface that introduces size properties to a Style receiver scope interface.

Source set: Common
public interface SizeScope

An interface that introduces size properties to a Style receiver scope interface.

Functions

width

Source set: Common
public fun width(value: Dp)

Sets the preferred width of the component. The actual size will also depend on the parent's constraints and other modifiers. The specified width includes both contentPadding and externalPadding.

This property is not inherited

Parameters

value The preferred width in Dp.

height

Source set: Common
public fun height(value: Dp)

Sets the preferred height of the component. The actual size will also depend on the parent's constraints and other modifiers. The specified height includes both contentPadding and externalPadding.

This property is not inherited

Parameters

value The preferred height in Dp.

width

Source set: Common
public fun width(@FloatRange(from = 0.0, to = 1.0) fraction: Float)

Sets the width of the component to a fraction of the parent's available width. The specified width includes any padding.

This property is not inherited

Parameters

fraction The fraction of the available width (e.g., 0.5f for 50%).

height

Source set: Common
public fun height(@FloatRange(from = 0.0, to = 1.0) fraction: Float)

Sets the height of the component to a fraction of the parent's available height. The specified height includes any padding.

This property is not inherited

Parameters

fraction The fraction of the available height (e.g., 0.5f for 50%).

Content updated: