Skip to main content
Question

Setting overlayPositionType from plugin API


Brian Hackworth

I’m building a plugin that adds some reactions to Figma design components. It mostly works, but I’m stuck on getting overlays to work right.

I’m looking for documentation or examples for how to set

  • overlayPositionType: “MANUAL”
  • overlayBackgroundInteraction: “CLOSE_ON_CLICK_OUTSIDE”

It looks like these are supposed to be set on the Frame that my Action points to. But I can only find readonly versions of these settings in, for example, FrameNode API docs.

What’s the trick for setting these programmatically?

Here’s the snippet defining the reaction:

  const reactions = [ ...fromNode.reactions ];
  reactions.push({
      trigger: { type: "ON_CLICK" },
      actions: [{
          type: "NODE",
          destinationId: overlay.id,
          navigation: "OVERLAY",
          transition: null,
        }]
  });
  return fromNode.setReactionsAsync(reactions);

 

0 replies

Be the first to reply!

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings