applyManualKeyframeTrack
Applies or replaces the manual Motion keyframe track for a property, paint, or effect field on this node.
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
applyManualKeyframeTrack(field: KeyframeField, track: ManualKeyframeTrackInput): void
Parameters
field
The property, paint, or effect field to animate.
track
The manual keyframe track to write.
Remarks
const node = figma.currentPage.selection[0]
if (node) {
node.applyManualKeyframeTrack(
{ type: 'PROPERTY', name: 'TRANSLATION_X' },
{
baseValue: { type: 'FLOAT', value: 0 },
keyframes: [
{ timelinePosition: 0, value: { type: 'FLOAT', value: 0 } },
{ timelinePosition: 0.3, value: { type: 'FLOAT', value: 120 } },
],
},
)
}