Figma Plugins

Figma Plugins

  • Introduction
  • API Reference
  • Updates

›Getting Started

Getting Started

  • Introduction
  • Prerequisites
  • Setup Guide
  • Figma and FigJam plugins
  • Setting editor type

Basics of Plugins

  • How Plugins Run
  • Accessing the Document
  • Editing Properties
  • TypeScript
  • Plugin Manifest
  • Creating a User Interface
  • CSS Variables and Theming
  • Accepting Parameters as Input

Development Guides

  • Making Network Requests
  • Working with Images
  • Working with Text
  • OAuth with Plugins
  • Debugging
  • Frozen Plugins

Properties

  • ~

Using External Resources

  • Libraries and bundling
  • Build Scripts
  • Resource Links
  • Figma Components

Other

  • Publishing
  • Stability and Updates
  • Proposed API
  • Samples
  • Get Help
  • Known Issues

Setting editor type

The Plugin API has both read and write functions, allowing developers to view, create, and modify the contents of Figma design and FigJam files. You can create plugins for a specific editor type, both editors, or build plugins that perform different actions in each editor.

We’ve added a new field in the manifest that allows you to specify which editor you are building a plugin for. This field can include a singular type, or both editor types:

"editorType": [
  "figjam",
  "figma"
],

Keep in mind, when you specify an editor type of both figma and figjam, your plugin won’t have access to certain functions and events depending on the editor the plugin runs in. For example, if you use figma.createSticky(), the code will work while the plugin is running in FigJam, but not when you run it in Figma. Learn more about what the Plugin API supports for each editor →

If you want to set conditional logic in your plugin to assign behavior based on the editor running the plugin, you can use the method figma.editorType. This will return a string value of either figma or figjam.

if (figma.editorType === figjam) {
  figma.createShapeWithText();
}
← Figma and FigJam pluginsHow Plugins Run →
Learn more about Figma