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

PositionScope

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

Source set: Common
@ExperimentalFoundationStyleApi
interface PositionScope

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

Functions

left

fun left(value: Dp)

Offsets the component horizontally from its original calculated left position. Positive values shift the component to the right, negative to the left.

This property is not inherited

Parameters

value The amount to offset from the left edge.

top

fun top(value: Dp)

Offsets the component vertically from its original calculated top position. Positive values shift the component downwards, negative upwards.

This property is not inherited

Parameters

value The amount to offset from the top edge.

right

fun right(value: Dp)

Offsets the component horizontally from its original calculated right position. Positive values shift the component to the left (further from the right edge), negative to the right.

This property is not inherited

Parameters

value The amount to offset from the right edge.

bottom

fun bottom(value: Dp)

Offsets the component vertically from its original calculated bottom position. Positive values shift the component upwards (further from the bottom edge), negative downwards.

This property is not inherited

Parameters

value The amount to offset from the bottom edge.

Last updated: