Layouts in new Unity UI?

Is there a way to create layouts for UI elements in the new Unity UI (4.6)? I have a text area and some buttons for a chat dialog, and when I show/hide the buttons, I want the text area to expand/shrink to fill the remaining space.

I haven’t see in any tutorials how to do this. Will I just have to write a script to resize the UI elements?

You can add Layouts to your Canvas or any GUI element. You can do this by selecting a GUI element and clicking on Add Component. In the Component menu you’ll find the different Layouts under “Layout”. If you have added a Layout to a GUI element then all childeren of this Element will be controlled by this Layout.