scrollinmg the menu pages with mouse touch

Hey, guys, I’m fairly new to scripting so I apologize if this turns out to be really basic, I am trying to Design a scrollable menu with the four buttons in the UI when I created the animation in state machine it’s not working is there any other way to do it thank you!

here’s the example of how it should look;

pls help me!!

I found it but I want to move the rect transformation with the mouse drag thank you!