ReadonlytypeThe type of the shape, which is always 'board' for boards.
When true the board will clip the children inside
WHen true the board will be displayed in the view mode
Optional ReadonlygridThe grid layout configuration of the board, if applicable.
Optional ReadonlyflexThe flex layout configuration of the board, if applicable.
The guides associated with the board.
ReadonlyrulerThe ruler guides attached to the board
OptionalhorizontalThe horizontal sizing behavior of the board.
OptionalverticalThe vertical sizing behavior of the board.
The fills applied to the shape.
The children shapes contained within the board. When writing into this property, you can only reorder the shapes, not changing the structure. If the new shapes don't match the current shapes it will give a validation error.
ReadonlyvariantsAccess to the Variant interface, for attributes and actions over the full Variant (not only this VariantContainer)
ReadonlyidThe unique identifier of the shape.
The name of the shape.
ReadonlyparentThe parent shape. If the shape is the first level the parent will be the root shape. For the root shape the parent is null
ReadonlyparentReturns the index of the current shape in the parent
The x-coordinate of the shape's position.
The y-coordinate of the shape's position.
ReadonlywidthThe width of the shape.
ReadonlyheightThe height of the shape.
ReadonlyboundsReadonlycenterIndicates whether the shape is blocked.
Indicates whether the shape is hidden.
Indicates whether the shape is visible.
Indicates whether the shape has proportion lock enabled.
The horizontal constraints applied to the shape.
The vertical constraints applied to the shape.
The border radius of the shape.
The border radius of the top-left corner of the shape.
The border radius of the top-right corner of the shape.
The border radius of the bottom-right corner of the shape.
The border radius of the bottom-left corner of the shape.
The opacity of the shape.
The blend mode applied to the shape.
The shadows applied to the shape.
OptionalblurThe blur effect applied to the shape.
The export settings of the shape.
The x-coordinate of the shape relative to its board.
The y-coordinate of the shape relative to its board.
The x-coordinate of the shape relative to its parent.
The y-coordinate of the shape relative to its parent.
Indicates whether the shape is flipped horizontally.
Indicates whether the shape is flipped vertically.
The strokes applied to the shape.
Optional ReadonlylayoutLayout properties for children of the shape.
Optional ReadonlylayoutLayout properties for cells in a grid layout.
ReadonlyinteractionsThe interactions for the current shape.
Appends a child shape to the board.
The child shape to append.
Inserts a child shape at the specified index within the board.
The index at which to insert the child shape.
The child shape to insert.
Adds a flex layout configuration to the board (so it's necessary to create a board first of all).
Returns the flex layout configuration added to the board.
Adds a grid layout configuration to the board (so it's necessary to create a board first of all). You can add rows and columns, check addRow/addColumn.
Returns the grid layout configuration added to the board.
Creates a new ruler guide.
Removes the guide from the current page.
If we know the namespace of an external plugin, this is the way to get their data.
The namespace for the shared data.
The key for which to retrieve the data.
Returns the shared data associated with the key as a string.
Changes the index inside the parent of the current shape. This method will shift the indexes of the shapes around that position to match the index. If the index is greater than the number of elements it will positioned last.
the new index for the shape to be in
If the shape is a component instance, returns the reference to the component associated otherwise will return null
TODO
Combine several standard Components into a VariantComponent. Similar to doing it with the contextual menu on the Penpot interface. The current shape must be a component main instance.
A list of ids of the main instances of the components to combine with this one.
Generates an export from the current shape.
Adds a new interaction to the shape.
Removes the interaction from the shape.
is the interaction to remove from the shape
Represents a VariantContainer in Penpot This interface extends
Boardand includes properties and methods specific to VariantContainer.