Set calculated width in conditional

Hi. I have a group and I’d like to set the width dynamically. It works great when I change the width to a fixed number.

Is there any way to set the width to a calculated number that is based on the value of an input slider? Basically, I want to set the width to a percentage of the max based on the slider (using :floor of course), but the width appears to only accept a fixed number.

Any ideas?

You’ll have to use CSS to get it to work since Bubble native doesn’t support dynamic values for dimensions.

Look for the plugin called Classify. It’s the easiest way to add CSS classes.

1 Like

Thank you

Do you think there is a way to make this work if I want an element to have a calculated width when it is in a repeating group? I’d like the width of the element in each cell to be calculated differently based on another input in that cell.

Is that possible?

With a different plugin I was able to create a dynamic ID, but I’m not sure if it would work here since each row is individual, and the same repeating group appears on more than one “page” of my single page app.

Thanks.

I did something similar when creating my own dynamic table without using table plugins. Try check it out and see if it can help you:

1 Like

Thank you! That looks perfect. I’ll dissect it tomorrow and give it a try.

This topic was automatically closed after 70 days. New replies are no longer allowed.