Prototypr

Prototyping, UX Design, Front-end Development and Beyond 👾 | ✍️ Write for us…

Follow publication

Member-only story

Listening for selection changes with the Figma plugin API

Building a Figma plugin: part 3 of 6

Daniel Hollick
Prototypr
Published in
4 min readFeb 6, 2020

** The code for this section is here.**

We can finally write some plugin code 🎉. First off we need to outline what our plugin needs to do.

🎰 Basic Functionality

The basic flow of our plugin looks like follows:

Let’s block this out in our code.

Go ahead and delete everything in code.js except for the line: figma.showUI(__html__) so we have a clean slate.

👂 Listening for Selection Changes

The first thing we are going to mock up is listening for user selection changes. We can use the built in selection change listener on the figma instance like this:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

Write a response