Skip to main content

Fr/Percent units for more control over auto layout content


Show first post

205 replies

Jared_Rice

100% agree. I am so excited for these Figma updates, but I got a little bummed when I realized we couldn’t use percentages. A bulk of my day to day is designing UI for web based applications and so percentages are everywhere.


Ben_Smeets
  • Active Member
  • 38 replies
  • July 5, 2023

That is “showing” the % only, not setting them. Unfortunately.


Tiffany10

+1! this would be great for responsive forms


Dennis_N
  • Power Member
  • 183 replies
  • July 13, 2023

@JackieChui You asked for a concrete example… there we go:

I would like to set the max-width to 100% of the parents frame to avoid elements like buttons to overflow. This would allow to combine hugging with the benefits of fill-container if the content would exceed. Especially if the component got resized.

See:


JackieChui
Figmate
  • Figmate
  • 28 replies
  • July 14, 2023

Thanks for the example!
Will share it with the team.


mattaningram

Percent based sizing is useful in general, not just for min/max width. It is one of the most common ways of sizing things when coding layouts. Relying on Fill width and pixel sizing just isn’t capable enough, especially when you want to handoff to devs and you want them to use percent based sizing.


Maiken_van_Vliet

I would also love to use percentages because of the way the auto layout wrap works. Because the min and max aren’t flexible, I now often have to use empty spacing layers to make sure everything wraps well. It would be way easier to way:

  • Min Width: 33%
  • Max Width: 50%

Now I often have to recalculate for different screen sizes.


+1, please Figma!


Bryan_Boone

Agree. Like others here I work on a web app with cards, tables, and other UI containers and elements that would benefit from percentages in Figma. Now I often have to draw fixed width drawings and math out the percentages – at least the width and height box make for quick math – but it is still a lot of work, especially if they change up at breakpoints. I can use fill on an auto layout for easy halves, thirds, quarters and other even layouts, but I find myself just always using even divisions to make my life easier in Figma when I should probably split containers by uneven percentages like 60/40 or 70/30.


Petr_Jandak
  • New Member
  • 4 replies
  • August 23, 2023

I really don’t understand, how it is possible to have auto layout without the percentages. I mean, if we want to create truly responsive layouts, it’s simply impossible to do it with the absolute values (or simply assume, that all the widths should be equal). I was really surprised it wasn’t the part of the min/max and wrap update, it’s directly connected and not fully usefull without it.


Petr_Jandak
  • New Member
  • 4 replies
  • August 23, 2023

+1
I really don’t understand, how it is possible to have auto layout without the percentages. I mean, if we want to create truly responsive layouts, it’s simply impossible to do it with the absolute values (or simply assume, that all the widths should be equal). I was really surprised it wasn’t the part of the min/max and wrap update, it’s directly connected and not fully usefull without it.


IraX
  • New Participant
  • 145 replies
  • August 23, 2023

Absolutely need percentages.


IraX
  • New Participant
  • 145 replies
  • August 23, 2023

Like the other post, definitely need to define a percentage for the width of a child element in its container. Or height. Or anything. Even spacing should be flexible – %, vw, vh, etc.


Definitely needed for responsive designs, please add this functionality Figma


Jack_Reeves

This is why im looking at penpot/framer. Im sorry but ever since adobe bought Figma things just slowed right down. Im glad you eventually added variables/tokens. But its almost too little and too late. It still lacks a lot…Then we have this feature…WHICH IS MUCH NEEDED! and is not rocket science to add … the community has obviously made you aware about its need over 2.5 years ago…but alas we are just shouting into the void!


Mike_Nino
  • New Member
  • 3 replies
  • September 15, 2023

For lists and table views, I usually create components for row-items in a list. Then I stack the list items vertically to make the list. When a list has multiple “columns”, you can set cell width using a fixed-width frame for each cell. That’s great for one page size but if I stretch the row-item horizontally, I want to control how cells in the row stretch. Some may need to remain fixed-width. Some will stretch to claim the extra available horizontal space.

If there’s only one cell in the list item that stretches horizontally, setting that one cell to “fill” works because it just claims all the horizontal space available to it.

But if you have multiple columns of different widths that need to stretch, the only option for stretching the cells is to set the auto-layout cell frame to “fill”, but that makes all cells resolve to the same width. I need them to fill the horizontal space up proportionately. Column A: 20%, Column B: 30%, Column C: 50%, for example.

It would be great if the widths of horizontal auto-layout frames inside another horizontal auto-layout frame could divide the horizontal space proportionally with percentage widths.

It’s a lot easier concept than it sounds. It seems like a basic need. Maybe I’m missing something in Figma. Maybe there’s another way to do what I’m looking for?


Roman_Gorshkov

yes, it’s required often


Darko_Atanasov

Yes! I googled and landed here while working on table column widths 🙂


Nicolas_Fol

It makes me so frustrated that this feature is not added. We want to build up our design like we would code them with HTML and CSS and for this we need the units to make it a bit responsive.

Edit: Or something like CSS GRID, to better visualise design that have odd layouts like 4 columns to 8 and so on. Its a shame, you could connect it to the existing grid. So many opportunities. Really hope this is going to be added soon.


Jinsu_Varghese1

Will this ever be resolved!!?


Nathan_Curtis

Agreed, this seems like a very valid use case, and is needed for at least one component in my client’s library.


vdekkernl
  • New Participant
  • 49 replies
  • October 24, 2023

Agreed, a while back I posted a similar request. See my post here:


Thibault_Serre1

We really need this feature,
We need to be able to set an element to “X columns” according to the column grid previously set (nb of columns, gutters and margins could be variables)
we need to be able to set a frame to “X %” of the parent

These features could help us to design more like dev, and this could be really useful for the devmode, to have a good devmode more close to the reality of HTML/CSS development.


Karen_Chan

+1 please.
It’d be amazing to be able to define how child elements to fill the parent by Fr/Percent units.


Scout_Digital

+1. Minimum character count.


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