Skip to main content
June 23, 2023
Solved

How to detect when user has selected a layer when plugin is running

Hi, i want my plugin to detect when I select a layer and enable a button in my menu like so:


What sort of event should I be listening for, and where should my handler be implemented ie inside my code.js or the script tag inside my ui.html?

This topic has been closed for replies.
tank666
tank666Solution
June 23, 2023

In code.js:

figma.com
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank

3 replies

tank666
tank666Solution
June 23, 2023

In code.js:

figma.com
UX/UI designer. Figma expert. Creator and developer of plugins and widgets for Figma and FigJam. Check out my resources in Figma Community: figma.com/@tank
Zack_HongAuthor
June 23, 2023

@tank666 thanks, it worked!

Jaydip_Upadhyay
New Participant
March 12, 2024

Thankyou Its Worked