parent
Returns the parent of this node, if any. This property is not meant to be directly edited. To reparent, see appendChild
.
Supported On:
- BooleanOperationNode
- CodeBlockNode
- ComponentNode
- ComponentSetNode
- ConnectorNode
- DocumentNode
- EllipseNode
- EmbedNode
- FrameNode
- GroupNode
- HighlightNode
- InstanceNode
- LineNode
- LinkUnfurlNode
- MediaNode
- PageNode
- PolygonNode
- RectangleNode
- SectionNode
- ShapeWithTextNode
- SliceNode
- StampNode
- StarNode
- StickyNode
- TableNode
- TextNode
- VectorNode
- WashiTapeNode
- WidgetNode
Signature
parent: (BaseNode & ChildrenMixin) | null [readonly]
Remarks
The root node (i.e. figma.root
) doesn't have a parent.
Components accessed via instance.mainComponent
do not always have a parent. They could be remote components or soft-deleted components.