How can I create a control button that can expand or hide the menus I've created?

I’m going to create a control button containing the menus I’ve made on unreal engine 5. It can expand these menus once I click on it and then hide the menus on the second click(The functionality for all the menus should be ensured). It works pretty similar to a button on Google Chrome as displayed in the following:
微信截图_20230209132438


How can I do it on unreal engine 5?

Use a Menu Anchor, or a ComboBox. Or simply show / hide another widget.