What Figma Plugins Can And Can't Do — Design Files

What Figma Plugins Can And Can't Do

As we all know, Figma just started to support plugins. This is truly a great thing, however, there is no need to overestimate its importance: none of those existing plugins change the workflow that drastically. Plugins aren't the key factor for using Figma, they just help to automatize routine processes and enable us to carry out a couple of new tasks. You should avoid plugins that determine the whole working process, however nothing of that sort is out yet.

Today we'll try to find out what that update really means in regard to the everyday workflow.


Overview

There is a new item in the Drafts tab called Plugins — it's a collection of plugins, from which you can choose the ones you like.

You can find installed plugins in the main menu and also in the pop-up one. There is a new hot key combination Opt + Cmd + P (Alt + Ctrl + P for Windows) which runs the plugin that was installed last. This is very convenient for such plugins as Paddet which updates offsets.

There is a very helpful bit in documentation for plugins' API — What’s Supported. It's written for plugin developers and shows what Figma allows them to do without crashing the client and causing bugs or personal data leaks.

It's very important to understand that there is a huge difference between Sketch and Figma plugins. Objective-C bridge in Sketch has the same permissions as Sketch itself. This has become a cause for a lot for complaints about poorly developed Plugins that crash Sketch.

Figma doesn't want to fall into the Sketch trap

In case of Figma, the stakes are higher: Sketch is a native app, which fully depends on macOS ecosystem and works locally, while Figma is a web platform, so its plugins should work similarly on all clients and shouldn't be tied to a particular OS.

Plugin only has access to the structure of the local file opened in Figma

Figma's API already supports more than a hundred methods and properties, but it is still very new and a maybe even a bit raw.

Figma's plugins already can

  • Create new layers. Demo plugin, which you can use as a blueprint for your own plugins, allows you to cover artboard with orange squares;
  • Create components from frames. It means that you can create a plugin, which could make a hundred components from the icon set at once;
  • Break down the majority of layer's properties and even change some of then. It's possible to change color, name, the place in the structure, coordinates, size and other features. You can also change content in text layers. This allows to automatically change content in layers with the plugins like Find and Replace or separate design from data by uploading texts to Google Sheets. However, you will still have to upload new text manually from the pop-up;
  • Get access to the already existing components, which are already in the file;
  • Open the pop-up and display the interface written in HTML/CSS/JS. This will really help to customize the pop-up;
  • Get access to browser's API. Because there is a part of plugin that works in iframe, you can send HTTP-queries, open files, plus use WebGL and other cool stuff. This allows you to paste new content into Figma, for example photos from photostocks like Unsplash or 3D-renders. However, the 3D thing is still very basic — it's Roto. There aren't any plugins which work properly with WebGL out yet.

Figma plugins can't do this yet

  • Read inherited properties. If the component's example has blue background, plugin won't know about it, because information is stored in the master to which plugin doesn't have access;
  • Have their own hot keys. It's a difficult task, because it should work on all platforms. In addition to this, we still have the same problem with conflicting keys, that we had in Sketch. It could've been easy to solve this problem for macOS by putting all the necessary plugins into the system menu, but there are other platforms which need the solution of this issue, too;
  • Detach examples;
  • Create prototypes and operate them;
  • Create outline;
  • Get the list of local styles;
  • Highlight the fragments of text;

If the community will have enough interest in those functions, developers are planning to implement them during the next few months.

Figma plugins probably won't do this

  • The worst: follow Figma events. There are some plugins which would be better to launch in real time, like in Sketch. So there have to be anchors which will react to events happening in the file: for example, the selected layer changed, frame was stretched and so on. This means that a potentially heavy code could activate a numerous times per second and start unpredictable processes, which will significantly slow Figma down. Besides, these plugins are especially dangerous, because designers will start to lose control of their own drafts. Visible action with the plugin launch will have to avoid damaged drafts;
  • Change Figma's interface. Dark Theme won't work, because plugins don't have access to UI-components of the Figma itself;
  • Build in as additional panels to the interface. It's the same issue connected to events and real-time workflow. Figma's developers also don't want users to mix up interfaces of plugins with Figma's interface;
  • Launch and work on stand-by. This would worsen the problem above. It might be unobvious that Plugin is even working and causing bugs;
  • Launch together with other plugins. It's impossible to predict how they can conflict with each other. Besides, if user entered his password and login in one plugin, another plugin shouldn't get access to that information;
  • Receive access to comments, file's and user's IDs, because they could follow our actions and even open the file, when we closed it; ;
  • Receive full access to organization's library. Plugins from the third-party developers can steal or mess up the whole UI-kit of the organization;
  • Work in a browser, because it's a completely different landscape. Right now plugins work in Figma's client for macOS or Windows;
  • Get access to the history of file's versions. because it's a completely different landscape. Right now plugins work in Figma's client for macOS or Windows;