How do you make a widget resize to the height of its content in a responsive design?

Amlynn shared this question 2 years ago

I'm new to JIM and I'm creating a responsive pattern library. I figured out how to make the width of a widget respond based on the browser size, but I'd like to make the height resize based on the content inside of it. "Relative to parent" seems to be relative to the entire page (not the widget itself) and I can't figure out a good way to calculate it. Any thoughts?

Comments (3)


For example, you can resize a rectangle widget to be a percentage of the screen. If I have text inside of that widget, it wraps inside the widget when it resizes but the height doesn't change when the text wraps.

Is there a way to say, "make the widget resize to the height of the content inside of it?"


Hi there,

Check out the 'calculated' option for resizing the height. The condition will be the Height of the text inside the rectangle. Note that the rectangle will collapse upward, so if the text is centered, the rectangle will not contain the text. To avoid this, have the text be at the top of the rectangle.

Hope this helps.




I'm trying the same thing with an ellipse, instead of a rectangle.

Is this possible? Text value varies because it'll show upon's a data master text field.