ArrangementSchema

@Serializable
sealed interface ArrangementSchema

Arrangement value controlling how children are distributed along the main axis of a container.

Three sub-interfaces correspond to layout direction:

SpacedBy takes a space (dp) and an optional cross-axis alignment to align children along the cross axis within each slot.

DSL helpers (mosaic-server):

// For Column:
arrangeVerticallyToTop()
arrangeVerticallyToBottom()
arrangeVerticallySpacedBy(space = 16, alignment = alignVerticallyToCenter())
arrangeToCenter() // HorizontalOrVertical.Center
arrangeToSpaceEvenly()
arrangeToSpaceBetween()
arrangeToSpaceAround()

// For Row:
arrangeHorizontallyToStart()
arrangeHorizontallyToEnd()
arrangeHorizontallySpacedBy(space = 8)
arrangeToCenter() // also valid for Row

Notes: Horizontal.Start and Vertical.Top are the fallback when the when branch hits an else in the client extensions — unknown arrangements default to Start/Top.

Inheritors

Types

Link copied to clipboard
@Serializable
@SerialName(value = "Horizontal")
sealed interface Horizontal : ArrangementSchema
Link copied to clipboard
@Serializable
@SerialName(value = "HorizontalOrVertical")
sealed interface HorizontalOrVertical : ArrangementSchema.Horizontal, ArrangementSchema.Vertical
Link copied to clipboard
@Serializable
@SerialName(value = "Vertical")
sealed interface Vertical : ArrangementSchema