Dynamically increase the top of a rectangle

Hello,

I would appreciate your help.

I have a rectangle, and I am trying to increase the height of the rectangle dynamically.

When I move the slider the rectangle’s height should increase from the top.

Thank you
Kat