animationStyles
The Motion animation style instances currently applied to this node.
Each entry is discriminated by type: "FIGMA" for a Figma-provided
animation style, whose props values are the configured property values
for this node, and "CUSTOM" for a CustomAnimationStyle.
Supported on:
- BooleanOperationNode
- CodeBlockNode
- ComponentNode
- ComponentSetNode
- ConnectorNode
- EllipseNode
- EmbedNode
- FrameNode
- GroupNode
- HighlightNode
- InstanceNode
- InteractiveSlideElementNode
- LineNode
- LinkUnfurlNode
- MediaNode
- PolygonNode
- RectangleNode
- SectionNode
- ShapeWithTextNode
- SliceNode
- SlideGridNode
- SlideNode
- SlideRowNode
- SlotNode
- StampNode
- StarNode
- StickyNode
- TableNode
- TextNode
- TextPathNode
- TransformGroupNode
- VectorNode
- WashiTapeNode
- WidgetNode
Signature
animationStyles: AppliedAnimationStyle[] [readonly]
Remarks
const node = figma.currentPage.selection[0]
if (node) {
for (const style of node.animationStyles) {
if (style.type === 'FIGMA') {
console.log(style.name, style.id, style.props)
} else {
console.log(style.name, style.id)
}
}
}