Is there any action to change element dimensions?

Not that I’m aware of through Bubble directly, but you can do this…

In your element which you’d like to change the width of, give it an element ID as shown below

Now have the button which you’ll click to change the width, run a workflow.
In that workflow create a ‘Run javascript’ action that has the following in it.

document.getElementById("myGroup").style.width = "300px";

Change your width value to what you need and that should do the trick.


Or if you want to animate the width, you could replace that JavaScript with this instead.
Set the 141 value to the starting width of your group. If it’s a fixed width then it should be fine, if not then it might need tweaking. I was trying to set the width dynamically with the line below but I didn’t get that working.

var pos = elem.style.width;

var elem = document.getElementById("myGroup");

var pos = 141;
var id = setInterval(frame, 5);

function frame() {
  if (pos == 300) {
    clearInterval(id);
  } else {
    pos++;
    elem.style.width = pos + 'px';
  }
}
11 Likes