Dynamic columns in a repeating group

Hellow Bubblers !

Previously most bubble developers have been using multiple repeating groups with different columns and showing/hiding them according to conditions. We have discovered that with the new responsive engine, it is possible to create dynamic columns. For those who still haven’t found a solution, we hope this post is helpful.

  1. Place a repeating group using the new responsive engine.
  2. Set a fixed number of rows to 1
  3. Uncheck fixed number of columns, and set its minimum width according to your need.
  4. Give a maximum width to the repeating group.

Demo link: Bubble | No-code apps

7 Likes

Do you know if it is possible to make columns of variable width so to adapt to a series of images while keeping constant the height (I mean setting a common height for all the images) and each aspect ratio as well? Thank you!

1 Like

Hey @federico.tomasi

You want an image inside a repeating group with a fixed height with maintained aspect ratio, and you want the width of that column to fit with the width of the image. Actually in bubble we can determine the height using the width.

You just have to check the “Keep element aspect ratio fixed” and set a width that you want. If the RG is not “Fixed” then each column will adjust according to the width of the image inside.
Let us know if this didn’t answer your questions.

Hi @Chakor ,
thank you for your reply. Unluckily I already observed what you suggest, but my goal would have been that to keep the height of an image as a constraint while accordingly (to its aspect ratio) to change its width. I have a sort of image gallery that scrolls horizontally and your way is a trade off because you have to guess a min width of images that will be uploaded by users so that their heights will be at least the height of the repeating group cells, otherwise you could have images of different heights.

So I think that currently it is not possible to do that with “native” Bubble element. Maybe the idea to build an image gallery through a repeating group is not so great at all and it is better to rely on some plugin or to code it by myself. Let me know if you think I am missing something. Thank you again

1 Like