Version 1, Update 140
Create and apply custom animation styles
The Plugin API now supports creating, editing, and applying reusable custom Motion animation styles.
New type
CustomAnimationStyle: A reusable, ordered collection of Figma-provided animation styles.
New methods and properties
figma.createCustomAnimationStyle(): Creates a local custom animation style.figma.getLocalCustomAnimationStylesAsync(): Returns the local custom animation styles in the current file.figma.moveLocalCustomAnimationStyleAfter()andfigma.moveLocalCustomAnimationFolderAfter(): Reorder local custom animation styles and their folders.animationEntries: Returns the ordered Figma animations in a custom animation style.addAnimationEntryAsync()andremoveAnimationEntry(): Add and remove Figma animations in a local custom animation style.
Updated Motion APIs
animationStyles: Now returns Figma-provided and custom animation styles, discriminated by"FIGMA"or"CUSTOM".applyAnimationStyle(): Now accepts a custom animation style ID with{ type: "CUSTOM" }.
Vertical auto-layout wrapping
layoutWrap can now be set to "WRAP" on vertical auto-layout frames (layoutMode === "VERTICAL"), in addition to horizontal auto-layout frames.