# Table of Contents - [Introduction | Plugin API](#introduction-plugin-api) - [Updates | Plugin API](#updates-plugin-api) - [Prerequisites | Plugin API](#prerequisites-plugin-api) - [API Reference | Plugin API](#api-reference-plugin-api) - [Setting Editor Type | Plugin API](#setting-editor-type-plugin-api) - [How Plugins Run | Plugin API](#how-plugins-run-plugin-api) - [Plugin Quickstart Guide | Plugin API](#plugin-quickstart-guide-plugin-api) - [API Reference | Widget API](#api-reference-widget-api) - [ERROR: The request could not be satisfied](#error-the-request-could-not-be-satisfied) - [Publishing | Plugin API](#publishing-plugin-api) - [loadFontAsync | Plugin API](#loadfontasync-plugin-api) - [Introduction | Widget API](#introduction-widget-api) - [Updates | Widget API](#updates-widget-api) - [Introduction | Code Connect](#introduction-code-connect) - [Libraries and Bundling | Plugin API](#libraries-and-bundling-plugin-api) - [Making Network Requests | Plugin API](#making-network-requests-plugin-api) - [Working in Dev Mode | Plugin API](#working-in-dev-mode-plugin-api) - [Accepting Parameters as Input | Plugin API](#accepting-parameters-as-input-plugin-api) - [figma | Plugin API](#figma-plugin-api) - [Asynchronous Tasks | Plugin API](#asynchronous-tasks-plugin-api) - [ERROR: The request could not be satisfied](#error-the-request-could-not-be-satisfied) - [Creating a User Interface | Plugin API](#creating-a-user-interface-plugin-api) - [Figma: The Collaborative Interface Design Tool](#figma-the-collaborative-interface-design-tool) - [Plugin Manifest | Plugin API](#plugin-manifest-plugin-api) - [Figma Enterprise | Building Great Products at Scale](#figma-enterprise-building-great-products-at-scale) - [Careers at Figma](#careers-at-figma) - [FigJam: The Online Collaborative Whiteboard for Teams](#figjam-the-online-collaborative-whiteboard-for-teams) - [The Typings File | Plugin API](#the-typings-file-plugin-api) - [Accessing the Document | Plugin API](#accessing-the-document-plugin-api) - [Updates for 2024-12-19 | Widget API](#updates-for-2024-12-19-widget-api) - [Global Objects | Plugin API](#global-objects-plugin-api) - [API Errors | Plugin API](#api-errors-plugin-api) - [figma.clientStorage | Plugin API](#figma-clientstorage-plugin-api) - [Figma for Education | Free Tools for the Classroom](#figma-for-education-free-tools-for-the-classroom) - [Editing Properties | Plugin API](#editing-properties-plugin-api) - [Prerequisites | Widget API](#prerequisites-widget-api) - [Updates for 2024-09-27 | Widget API](#updates-for-2024-09-27-widget-api) - [Node Types | Plugin API](#node-types-plugin-api) - [figma.ui | Plugin API](#figma-ui-plugin-api) - [Version 1.9.2 | Widget API](#version-1-9-2-widget-api) - [figma.util | Plugin API](#figma-util-plugin-api) - [Setup Guide | Widget API](#setup-guide-widget-api) - [Resource Links | Plugin API](#resource-links-plugin-api) - [CSS Variables and Theming | Plugin API](#css-variables-and-theming-plugin-api) --- # Introduction | Plugin API [Skip to main content](#) On this page Welcome to the Plugin API! Plugins are programs or applications [created by the Community](https://www.figma.com/community/plugins) that extend the functionality of Figma's editors. Plugins run in files and perform one or more actions. Users and organizations take advantage of plugins to customize their experience and create more efficient workflows. Plugins are created using two common languages of web development: JavaScript and HTML. You’ll need an understanding of these languages to develop plugins. You’ll write the functionality of your plugins in **JavaScript** and build your user interface (UI) using **HTML**. [**Explore required knowledge →**](/plugin-docs/prerequisites/) Plugins interact with Figma's editors using the dedicated **Plugin API**. They can also leverage the external web APIs available in most modern browsers. You can build plugins that run immediately when invoked by the user, or that require users to input information via custom UI. [**Explore how plugins are run →**](/plugin-docs/how-plugins-run/) The [API reference](/plugin-docs/api/api-reference/) and this accompanying documentation has the information you need to build plugins. To ask questions, give feedback, or connect with other plugin developers: [**Join our community-driven Discord server →**](https://discord.gg/xzQhe2Vcvx) Our quickstart guide takes you through the process of setting up your environment and running a sample plugin. [**Get started with the Plugin API →**](/plugin-docs/plugin-quickstart-guide/) [](#plugin-api-access "Direct link to heading") Plugin API access ----------------------------------------------------------------- The Plugin API supports both **read** and **write** access to Figma’s editors, allowing developers to view, create, and modify the contents of files. You can access most of the plugin API through the [**figma**](/plugin-docs/api/figma/) global object. Plugins interact with, first and foremost, the content of files. That's anything that exists in the layers panel and any properties associated with those layers in the properties panel. Plugins can view and modify aspects of these layers (or nodes), like the color, position, hierarchy, text, etc. Figma files are [loaded dynamically](https://help.figma.com/hc/en-us/articles/1500005554982-Guide-to-files-and-projects#h_01HHDQ77YC3D3NK7K9DEE3SQKQ) . This means that [pages](https://help.figma.com/hc/en-us/articles/1500005554982-Guide-to-files-and-projects#design-pages) are only loaded by the editor as needed (for example, when a user navigates to a page). Plugins must use asynchronous APIs to access parts of the file that are outside of the currently-viewed page. There are some limitations to what plugins can access: * Styles and components from any team or organization libraries. The Plugin API can only access styles, components, and instances that are currently in the file, or have been imported into the file via a function like [`importComponentByKeyAsync()`](/plugin-docs/api/figma/#importcomponentbykeyasync) . * External fonts or web fonts accessed via a URL. Plugins can only access fonts that are accessible in the editor, which includes Figma's default fonts, [shared organization fonts](https://help.figma.com/hc/en-us/articles/360039956774) , or [fonts stored locally on your computer](https://help.figma.com/hc/en-us/articles/360039956894) . The Plugin API can only access editor fonts that have been [loaded via `loadFontAsync()`](/plugin-docs/api/properties/figma-loadfontasync/) . This doesn't apply to fonts that you use in your plugin's UI. * Other file metadata like the file's team or location, permissions, or any comments associated with that file. The includes the version history of that file. You can get read access to these aspects of a file via [Figma's REST API](https://www.figma.com/developers/api#intro) . Plugins can behave differently depending on what the user is doing, such as whether they're in Figma Design Mode, Dev Mode, FigJam, or Figma Slides. Plugins running in Dev Mode have certain differences that are important to understand. Learn more in our [**Working in Dev Mode →**](/plugin-docs/working-in-dev-mode/) guide. **Document structure** Every file in Figma consists of a tree of nodes, and at the root of every file is a DocumentNode. The DocumentNode is how you access and explore the contents of a file. In a Figma design or FigJam file, every DocumentNode will have PageNodes that represent each page in that Figma file. In the case of Figma Slides, there is only one PageNode, representing the slide deck. There is only one DocumentNode per browser tab and each of its children are PageNodes. Because Figma files are [loaded dynamically](https://help.figma.com/hc/en-us/articles/1500005554982-Guide-to-files-and-projects#h_01HHDQ77YC3D3NK7K9DEE3SQKQ) , not all PageNodes are immediately loaded and available to a plugin. Developers can use the Plugin API to load and traverse additional PageNodes as needed. The **DocumentNode** can have any number of child nodes. Each subtree that stems from the DocumentNode represents a layer or object on the canvas. There are specific nodes or classes for different types of layers in Figma — like frames, components, vectors, and rectangles. Nodes have a number of properties associated with them. Some of these are **global properties**, that exist on every node, whereas other properties will be specific to the type of node. You can create plugins for a specific editor type, for multiple editors, or build plugins that perform different actions in different editors. While some node types can only be created in a specific file or editor type, you will generally be able to read and modify most nodes, regardless of the editor type, unless your plugin is running in Dev Mode. [**Working in Dev Mode guide →**](/plugin-docs/working-in-dev-mode/) **Asynchronous** The Plugin API is designed to be used asynchronously, and Figma encourages plugin developers to utilize the asynchronous methods provided by the Plugin API. A number of critical operations for Figma plugins, like loading pages and working with fonts and images, are asynchronous. [**Asynchronous Tasks →**](/plugin-docs/async-tasks/) **Browser based** Figma is predominantly browser-based software, which means it can be run on all full desktop operating systems (MacOS, Windows, Linux, etc), as well as Chrome OS . Like Figma, plugins are powered by web technologies. Part of the Plugin API runs in an `