Position

sealed interface Position(source)

Defines how a flex item is positioned within or relative to the flex container. Mirrors CSS position.

Inheritors

Types

Link copied to clipboard
data class Absolute(val top: Float? = null, val left: Float? = null, val right: Float? = null, val bottom: Float? = null) : Position

The item is removed from flex flow and positioned relative to the flex container using top, left, right, and bottom. Mirrors CSS position: absolute.

Link copied to clipboard
data class Relative(val top: Float? = null, val left: Float? = null, val right: Float? = null, val bottom: Float? = null) : Position

The item participates in flex flow; top, left, right, and bottom offsets shift its painted position without affecting sibling layout. Mirrors CSS position: relative.

Link copied to clipboard
data object Static : Position

The item participates in flex flow with no offset. Mirrors CSS position: static.