Skip to main content

I want to set two relaunchButtons on DocumentNode, I have set it with figma.root.setRelaunchData({'cmdA': 'command A', 'cmdB': 'command B' })

and I have added these in manifest.json file too.


How do I set the button actions? I want to create a rectangle shape with cmdA and a cirlce with cmdB? I want to run a method on button click.


I couldn’t find how to achieve this in the documentation. Can anyone help me with this?

figma.command provides that I believe but I don’t remember for sure


figma.com

Thanks. It’s working.


if (figma.command === 'cmdA') createRectangleA()