@zeplin/extension-model
    Preparing search index...

    Class Layout

    An interface to represent the layout of Layer

    Index

    Constructors

    Properties

    alignment?: LayoutAlignment

    Determines how the children are aligned inside the layer.

    direction?: LayoutDirection

    Determines how the children of the layer are laid out in this layer:

    • "row": The children are placed on a line horizontally
    • "column": The children are stacked vertically
    distribution?: LayoutDistribution

    Determines how the children are distributed inside the layer.

    gap?: number

    Distance between children of the layer.

    itemAlignment?: LayoutAlignment

    Determines how the children are aligned inside the layer.

    padding?: LayoutPadding

    Padding between the borders of the layer and its children.

    sizingMode?: LayoutSizingMode

    Determines if the layer has fixed or automatic length for its axis which is orthogonal to its layout direction, i.e., its width if Layer.direction is "column" or its height if Layer.direction is "row".

    wrap?: boolean

    Indicates whether the children wraps if they don't fit the width/height.

    wrapGap?: number

    Spacing in counter axis of the direction.

    Accessors

    • get ALLOWED_FIELDS(): string[]

      Returns string[]

    Methods

    • Creates a Layout instance from a JSON string

      Parameters

      • json: string

        JSON string representing a layout

      Returns Layout

      A new Layout instance