How can I create the Expanded/Collapsed UI with Action Graph

Hi Team,
I am using Create 2022.3.3
I have created UI with action graph. I want to know how to create the expanded or collapsed UI in the viewport with action graph.
I have attached the reference Image and short clip of video.

(In attached screenshot Marked red box I need in collapsed Menu)
Menu.mkv (4.1 MB)

(In attached video If I am clicking the PAINTS menu, the below items needs to be collapsed)

Also I want to know from action graph can I change the Text color in the Viewport Buttons or Instead of buttons Should I add the Custom Icons ?

Please take a look and share some reference videos or documents which is more helpful.
Thanks in Advance.