Skip to main content
Version: 4.60

Constraints

A list of constraints defining the position and size of the layer in a layout.

This type is a list with the following entry types:

KeyTypeDescriptionDefault Value
"anchor"StringThe anchor of this element.null
"aspectRatio"String,NumberThe aspect ratio of this layer. This is the value of width / height.null
"colSpan"NumberThe amount of columns this layer should span over.null
"height"UnitSizeThe height of this layer.null
"ratio"String,NumberThe aspect ratio of this layer. This is the value of width / height.null
"relativeAnchor"StringThe anchor of the other layer.null
"relativeTo"StringThe name of the layer this constraint is related to. If not set, the parent is the other layer.null
"type" (required)StringConstraint type.null
"width"UnitSizeThe width of this layer.null
"x"String,NumberThe amount this layer should be moved to the right.null
"y"String,NumberThe amount this layer should be moved to the bottom.null