Insert the "Dynamic Height and Width" element on the canvas and fill in the element's id, height and width.
After that, add conditionals so that the height and width changes dynamically.
Obs: When viewing in test mode with debug_mode activated, the plugin may not work correctly with the dynamic height and width function, if this is the case, disable debug_mode and test again!
Demo editor:
https://bubble.io/page?type=page&name=dynamic_width_and_height&id=wedevstests&tab=tabs-1