How can I make buttons in a list move up or down?

I’m not entirely sure how to word this so really sorry if it ends up being a bit confusing, but basically I’m messing around with UI and I wanna try to create a style for my buttons/switching between them that I’ve seen in other games and think is pretty cool I’m not sure what it’s called or if there’s even a name for this so here’s a gif

(when switching from continue to chapter select all the buttons move down and if you were to go up they would move up instead)
Image from Gyazo

So I’ve done something like this before in Roblox (ex roblox dev) minus the actual moving of the buttons going down or up so basically I’ve done normal menu before lol and my method was to have a list of all the buttons, a variable for the current selected button and then when the up or down arrow key is pressed I get the index for the current button and subtract or add 1 to go to the next button in the list and I’d assume it’s a somewhat similar process in unity the only issue is I don’t know what to use to move everything up or down.

Funny thing, I was just reading the documentation for UI and it sounds like what you need is a Layout Controller: Auto Layout | Unity UI | 1.0.0

I don’t have an example to show you, but based on the documentation you can use it to controller the order of UI elements like buttons. This may be more complicated than what you need, but check it out.