Can i change the layout when i click a button?

for example, I whould like to add a row or change some other layout of the frame when i click a button. how can i do this operation.

You can change the visibility of a row by returning gr.update(visible=True) or gr.update(visible=False) and assign the output to be a Row