id
An internal identifier for a node. Plugins typically don't need to use this since you can usually just access a node directly.
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
id: string [readonly]
Remarks
One possible use case for using the id
is to have a serializable representation of a Figma node. To "deserialize" an id back into a node, pass it to figma.getNodeById
. This will return null if the node is no longer present in the document.