Skip to content

Latest commit

Β 

History

History
296 lines (213 loc) Β· 9.8 KB

File metadata and controls

296 lines (213 loc) Β· 9.8 KB

Layer

Kind: global interface

layer.type : String

Type of the layer, text, shape or group.

Kind: instance property of Layer

layer.shapeType : String

Shape type of the shape layer, rectangle or ellipse.

Kind: instance property of Layer

layer.name : String

Name of the layer.

Kind: instance property of Layer

layer.sourceId : String

Id of the layer in the source design document.

Kind: instance property of Layer

layer.componentSourceId : String

Id of the related component in the source design document.

Kind: instance property of Layer

layer.rect : Object

Bounding rectangle of the layer.

Kind: instance property of Layer

Properties

Name Type
x Number
y Number
width Number
height Number

layer.layout : Layout

Layout properties of the layer.

Kind: instance property of Layer

layer.constraints : LayerConstraints

Layout constraints of the layer.

Kind: instance property of Layer

layer.layoutAlignment : Layout.ALIGNMENT

Alignment of the layer, defined in Layout.ALIGNMENT.

Kind: instance property of Layer

layer.layoutGrow : Number

Grow rate of the layer. This property specifies how much of the remaining space in the parent layer should be assigned to the item. Can be zero or a positive number.

Kind: instance property of Layer

layer.fills : Array<Fill>

Fills applied to the layer.

Kind: instance property of Layer

layer.borders : Array<Border>

Borders of the layer.

Kind: instance property of Layer

layer.shadows : Array<Shadow>

Shadows applied to the layer.

Kind: instance property of Layer

layer.blur : Blur

Blur applied to the layer.

Kind: instance property of Layer

layer.opacity : Number

Opacity of the layer, [0, 1].

Kind: instance property of Layer

layer.blendMode : Fill.BLEND_MODES

Blend mode of the layer, defined in Fill.BLEND_MODES.

Kind: instance property of Layer

layer.borderRadius : Number

Border radius of the layer.

Kind: instance property of Layer

layer.rotation : Number

Rotation of to the layer.

Kind: instance property of Layer

layer.exportable : Boolean

Indicates whether the layer has assets or not.

Kind: instance property of Layer

layer.assets : Array<Object>

Assets of the layer.

Kind: instance property of Layer

Properties

Name Type
density string
format string

layer.parent : Layer

Parent layer of the layer.

Kind: instance property of Layer

layer.version : Version

Version of the screen or component containing the layer.

Kind: instance property of Layer

layer.content : String

Text of the text layer.

Kind: instance property of Layer

layer.textStyles : Array<Object>

Text styles of the text layer, with ranges.

Kind: instance property of Layer

Properties

Name Type
range Object
range.start Number
range.end Number
textStyle TextStyle

layer.layers : Array<Layer>

Child layers of the group layer.

Kind: instance property of Layer

layer.componentName : String

Name of the component the group layer is referencing.

Kind: instance property of Layer

layer.inspectable : Boolean

Whether the layer is inspectable in Zeplin.

Kind: instance property of Layer

layer.cornerRadius : CornerRadius

Corner radius of the layer.

Kind: instance property of Layer

layer.styleName : String

Shared style name of the layer.

Kind: instance property of Layer

layer.styleSourceId : String

Shared style source identifier of the layer.

Kind: instance property of Layer

layer.textStyleName : String

Shared text style name of the layer.

Kind: instance property of Layer

layer.textStyleSourceId : String

Shared text style identifier of the layer.

Kind: instance property of Layer

layer.maxHeight : Number

Max height of the layer.

Kind: instance property of Layer

layer.maxWidth : Number

Max width of the layer.

Kind: instance property of Layer

layer.minHeight : Number

Min height of the layer.

Kind: instance property of Layer

layer.minWidth : Number

Min width of the layer.

Kind: instance property of Layer

layer.maxLines : Number

Max lines of the text layer.

Kind: instance property of Layer

layer.textTruncation : String

Determines how long text should be truncated for the text layers. Possible value is end.

Kind: instance property of Layer