Layer Constraints

Resizing constraints of the layer relative to its parent

Type: object

AttributeTypeDescription
relative_tostring (Optional)Identifier of the layer the constraints are relative to
horizontalobject (Optional)Horizontal resizing constraint
verticalobject (Optional)Vertical resizing constraint

horizontal

Horizontal resizing constraint

AttributeTypeDescription
sizing_modestring ("fixed", "stretch" or "hug-contents") (Optional)Sizing mode of the layer along the axis
minboolean (Optional)Indicates whether the layer is pinned to the minimum edge of the axis
maxboolean (Optional)Indicates whether the layer is pinned to the maximum edge of the axis

vertical

Vertical resizing constraint

AttributeTypeDescription
sizing_modestring ("fixed", "stretch" or "hug-contents") (Optional)Sizing mode of the layer along the axis
minboolean (Optional)Indicates whether the layer is pinned to the minimum edge of the axis
maxboolean (Optional)Indicates whether the layer is pinned to the maximum edge of the axis

Example

{
  "horizontal": {
    "sizing_mode": "stretch"
  },
  "vertical": {
    "sizing_mode": "hug-contents"
  }
}