Adjust size of shape based on user input


Im struggling to see a way to draw a box based on a number that a user has input. Maybe this is not possible?

What I am trying to create is a dynamic ratio calculator - a user inputs x and y, I divide x by y to figure out the z:1 ratio, and would like to draw a box, possibly with another to illustrate the differences.

I don’t think there is a way to do that in bubble yet. But you can make an HTML rectangle and have dynamic width and length using this piece of code. I am not sure if this is exactly what you are going for. Just replace the numbers with your dynamic data.

My phone is being dumb and not letting me post the code. Anyways, that is a link to find the code.

By the way, WELCOME TO BUBBLE!!! :partying_face:


Yeah that’s pretty useful thanks. How do I pass the info from the bubble input field to the w/h of the svg rectangle?

Actually I think I just figured that out…

1 Like

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