Skip to main content
Question

How to set vertical gap between row

  • April 29, 2024
  • 1 reply
  • 211 views

Apirak

I’ve set itemSpacing = 16; in my Figma plugin, but it seems to only affect the horizontal spacing. How can I apply this spacing vertically between rows as well?

    ....
    styleGroupFrame.name = 'Pantone';
    styleGroupFrame.layoutMode = 'HORIZONTAL';
    styleGroupFrame.itemSpacing = 16;
    styleGroupFrame.fills = [];
    styleGroupFrame.primaryAxisSizingMode = 'FIXED'; 
    styleGroupFrame.counterAxisSizingMode = 'AUTO'; 
    styleGroupFrame.layoutWrap = 'WRAP';
    styleGroupFrame.layoutAlign = 'STRETCH'; 
    ...

The result look like this

This topic has been closed for replies.

1 reply

Gleb
  • Power Member
  • 4710 replies
  • April 29, 2024

You can find all Auto Layout properties here: FrameNode | Plugin API

The property you are looking for is right after the itemSpacing: it is counterAxisSpacing. 🙂


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