Skip to main content

Launched: Negative values in Auto Layout


Brian_Clay

Sometimes elements overlap. And that’s ok. Please let us have negative values in auto layout. This includes negative values for padding and spacing between elements.

This topic has been closed for comments

108 replies

Richard_Doyle

I think I saw Rogie do this in a demo, there’s an option in the auto layout that’s called “packed” or something like that. If you change it from the default you can get the effect you’re looking for.

Agreed that it’s not intuitive and could be easier for things you want to overlap. My most common use case is table rows with borders. I want them to overlap so the borders aren’t doubled up.

(I’m on my phone right now so can’t check exactly how it works.)


Brian_Moyano

Yes, as @Richard_Doyle said, the option that you’re looking for is ‘Spaced between’, that will distribute all your avatar evenly. But if you shrink your group all the avatars will start to overlap.


Brian_Clay
  • Author
  • 9 replies
  • January 27, 2021

Yeah, I’m aware of the hack. That’s how I’m doing it in my screenshot. It’s limited though and not very precise. If you were to build it with CSS you would totally have to guess on the negative value. Figma is probably blocking negative values so it doesn’t mess up the layer hierarchy which is already a mess.


Mr.Biscuit
  • 109 replies
  • February 2, 2021

ahhaha 😍 This is the exact post I wanted to post but forgot. I have mailed Figma support a couple times about this, they had negative padding when auto-layour v3 initially rolled out, I even had one or two components with independent negative padding values, at the time although you can’t type negative values directly but you can option drag, I am just regret I didn’t make hundreds of them from -1 to -999 so I can just copy paste them and use everywhere. Please have this feature back, if it was caused by a bug we need to have this bug 🤓


rahendz
  • 17 replies
  • February 2, 2021

It’s just my request, hope everyone also need this. Instead create multiple variant to move object inside the component frame, such as scrolling tab nav while last item (outside the frame) nav is active, i only need the auto layout padding accept the negative value so it could move object inside move outside the frame. just like the indentation but in opposite way :3


Hoby-Van-Hoose

I was just hoping for something like this when trying to deal with text objects arranged vertically. I don’t want to uniformly change the text style but I also don’t want the same spacing in this one auto-layout object. I’d need negative space between to achieve this.


Luis_Chacon

The struggle is real! If your problem is duplicated borders, for instance in a table, this is how I’m solving it now:

I create the atom component with 2 variants, one with “top border” only, and the other with both borders (which would be the last row of the table). I named the properties as “Both borders=Yes” and “Both borders=No”. This will show a toggle switch to enable the bottom border for the last row of the table.

Let me know if there’s a better hack 😅


Gary_Chiang

Need negative spacing for auto layout to make items overlapping!


Baffour
  • 53 replies
  • April 6, 2021

+1 on this. The limitation of “Space between” is that auto layout has to be of fixed width. This means if you add a fourth item the space between each of those items will shrink to fit the new element. But you may actually want the space to stay constant and the total width to change.

Not actually sure why things like this are prevented! Is it just an attempt to simplify things by restricting valid inputs, or is there a technical reason attached?


Yulia
  • 39 replies
  • April 7, 2021

+1


Felipe_Hefler

I believe an optimal approach would be to allow Auto Layout items to let their children to have their own margins, either negative or positive. In that way the children will be able offset anything within their parent.


yohanna
  • 1 reply
  • April 13, 2021

extremely needed!!!


Veronica_Ward

+1 - really wanting this for table components. I’m working on a lot of tables and being able to have negative padding would make things so much easier. it’s rough to workaround.


Allard_Rothengatter

This, indeed would be a great addition. Been running into this quite a few times now. E.g. when you have elements/components with a stroke, the stroke becomes double when you use auto-layout since it’s stacking bottom stroke to top stroke of the next elements while strokes on the side remain the same. Had to ditch the auto-layout and move all elements up one pixel to get a crisp single pixel stroke on all elements.

In addition, z-index would be great so elements with different stroke color can be on top of another element so stroke is the same color all around the object.

Other than this, lots of love for Figma, you guys are doing an awesome job.


Conway_Anderson

I’d like to be able to add negative space for auto layout items.

Example use case: an avatar cluster where you want the avatars to overlap each other.


Aeron_Ridgeway

I cannot replicate what is possible with code while using auto layout because it does not allow negative values.

Please allow negative values so I can stack elements on top of one another while they are part of the same group.


Elias1
  • 4 replies
  • April 29, 2021

Just give it more weight here! Highly needed +1


Clara_Dalbera

We need negative values in autolayout pleeeeeeeease.
I need it to align the baselines of different fonts without losing the autolayout features on the widths of my components.


Yan_Qi
  • 1 reply
  • April 30, 2021

+1, don’t know how much technical effort it’s going to take, but Figma please consider implementing this feature for future updates, especailly now a majority number of designers should be grasping how auto-layout works so it totally makes sense to enable negative values for space between.


Jono_Young

For folks looking to use this feature request to create tables (like me), I think the better solution is to allow for independent auto layout border values (like padding allows) so we can have no border (0) on a given side.


Tran_Dung

Yes please!


Ben_Smeets
  • Active Member
  • 38 replies
  • May 19, 2021

Same here, another use case is list items with a divider, you want that -1px spacing 🙂


FakeGeek
  • 1 reply
  • May 19, 2021

Yes, we do really need negative values in auto layout!


Erick
  • 1 reply
  • May 19, 2021

I couldn’t agree more. Independent control for any border side is a must. 👆


Eddie_Velez

Just noting this is the same request as Negative values in Auto Layout


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