Search
ComponentInstanceNode
ComponentInstanceNode
An instance of a code or design component on the canvas.
Component instances are identified by their componentIdentifier and can have their control properties updated via setAttributes.
Methods & Properties
The name of the node displayed in the layers panel.
Whether the node is visible on the canvas.
Whether the node is locked for editing.
Identifier of the component. Supported by ComponentInstanceNode, ComponentNode.
Name of the component. Supported by ComponentInstanceNode, ComponentNode.
Property control values for code components. Supported by ComponentInstanceNode.
Rotation angle in degrees.
Opacity of the node, from 0 (fully transparent) to 1 (fully opaque).
Positioning behavior of the node. - "relative": Default for nodes in stack/grid layouts - "absolute": Positioned relative to parent - "fixed": Positioned relative to viewport - "sticky": Sticks to viewport edges when scrolling
Distance from top edge when using absolute/fixed positioning.
Distance from right edge when using absolute/fixed positioning.
Distance from bottom edge when using absolute/fixed positioning.
Distance from left edge when using absolute/fixed positioning.
Center anchor horizontal position as percentage (e.g. "50%").
Center anchor vertical position as percentage (e.g. "50%").
Width of the node.
Height of the node.
Maximum width constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Minimum width constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Maximum height constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Minimum height constraint. Supported by FrameNode, TextNode, ComponentInstanceNode.
Width-to-height ratio (e.g. 1.5 for 3:2).
Remove this node from the canvas tree.
Select this node on the canvas.
Clone this node, creating a duplicate in the canvas tree.
Set the attributes of this node.
Get the bounding box of this node.
Pans and zooms the viewport to center the node.
Navigate to this node.
Get the parent of this node in the canvas tree.
Get the children of this node in the canvas tree.
Get descendants of this node that match the given type.
Get the descendants of this node that support attribute.
Get the descendants of this node that have attribute set to a non-null value.
Walk this node and its descendants recursively.
Get plugin data by key.
Set plugin data by key.
Get all plugin data keys stored on this node.