
Styles can be put inside folders (including nested folders) by setting the name of the style to be a delimited path name.įor example, the following code would move a paint style named Style 1 into a nested folder named b. Gets the status of this style/component in the team library. Note that while this key is present on local and published components, you can only import components that are already published. The key to use with figma.importComponentByKeyAsync, figma.importComponentSetByKeyAsync and figma.importStyleByKeyAsync. Remote components are read-only: attempts to change their properties will throw.

Whether this style/component is a remote style/component that doesn't live in the file (i.e.

The documentation links for this style/component. The annotation entered by the user for this style/component. Publishable properties description: string This enables iterating through all data stored in a given namespace. How to apply a text style to a layer First off, select your layer and go to the Text section in the right-hand sidebar. Give your style your preferred name (let's say Text Style 1) and click on the Create Style button. Retrieves a list of all keys stored on this node or style using setSharedPluginData. Click on the + icon in the right corner of the Text Styles modal. GetSharedPluginDataKeys(namespace: string): string Lets you store custom information on any node or style, public to all plugins. SetSharedPluginData(namespace: string, key: string, value: string): void If there is no data stored for the provided namespace and key, an empty string is returned. Retrieves custom information that was stored on this node or style using setSharedPluginData. GetSharedPluginData(namespace: string, key: string): string This enables iterating through all data stored privately on a node or style by your plugin. Retrieves a list of all keys stored on this node or style using using setPluginData. Lets you store custom information on any node or style, private to your plugin. SetPluginData(key: string, value: string): void If there is no data stored for the provided key, an empty string is returned. Retrieves custom information that was stored on this node or style using setPluginData. Note that setting this also sets "autoRename" to false on TextNode. to make the node properties reflect that of the style node. You can assign this value to fillStyleId, backgroundStyleId, strokeStyleId, textStyleId, etc. The unique identifier of the style in the document the plugin is executing from. Value to replace the text paragraphSpacing with.

Value to replace the text paragraphIndent with. Value to replace the text lineHeight with. Value to replace the text letterSpacing with. Value to replace the text textDecoration with. Always check the type before reading other properties. The string literal "TEXT" representing the style type.
