Skip to main content
Mortyakard
New Participant
July 26, 2023

Limit number of Items in "auto layout" when using Wrap

  • July 26, 2023
  • 17 replies
  • 4677 views

I need to limit the number of items when using Wrap on Auto Layout.
Like the number of columns or rows on grids.

I want to use wrap auto layout and auto-fill on inner items at the same time and I want to set a limit for the number of columns or rows.

Look at these images, I designed that thing I meant.

Additional:
I don’t want to use max/min width, because these happen:

17 replies

Josh
Former Community Manager
July 26, 2023

You can sort of achieve this by applying a max width and height and then setting the auto layout frame to clip content.

Mortyakard
New Participant
July 26, 2023

@Josh Thanks Josh,
Yeah, I knew it can possible in this way, but it takes time to do and sometimes I don’t want to set max width and height for the components.
and this way have a problem in some situations, please look at this image:


First row get 4 items
second row get 3 items and different sizes

XavierV
Active Member
August 24, 2023

Yes ! we need that of course !

Dennis_N
Power Member
September 26, 2023

+1
I stumbled over this issue today aswell. This feature would be super helpful.

Alden_Tan
New Member
September 29, 2023

+1 to this. Defining a max width for the entire row is not useful as I also can’t control the number of items in a row (e.g. I want to display max 4 cards in a row, but 5 cards may be displayed if the individual card widths still allow for 5 to be displayed within the max defined row width)

Susanne_Opsvik
New Member
October 9, 2023

+1 to this.

I am struggling with the same issue. This is a feature which would be very useful!

Susanne_Opsvik
New Member
October 9, 2023

Not sure wether i would prefer a “max number of items” or rather have to possibility to turn on “same width” controll in autolayout. Like this:

Jan_Kopriva_BSSHOP_s.r.o
New Participant
December 12, 2023

It would be great!!!

Dennis_N
Power Member
January 11, 2024

Hm, how does Figma know the max. number of items each row should have if the items are set to “fill” but there is no field to define the max number of items?

Amadeusz_Wasik
New Participant
May 14, 2024

As a trick, I’m using min/max + empty frames as fillers. Working as a charm.

Here you got the example: https://www.figma.com/design/DX7T8nkAhxPOtw0iTEsucp/Auto-layout---wrap-cheat?node-id=0%3A1&t=4AXLHQxMin2BLtlz-1