Skip to main content

applyManualKeyframeTrack

Applies or replaces the manual Motion keyframe track for a property, paint, or effect field on this node.

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 } },
],
},
)
}