How to create dropdown menu in vaadin 23

Hello Team ,I’m using spring boot + vaadin application i have a list of buttons i just want them to be in the drop down menu/list(just like image below) how can I do it in vaadin please help
Abc.gif

https://vaadin.com/docs/latest/components/menu-bar

The way I got this to work was to create a MenuBar with only one MenuItem, as such…

var menuItem = menuBar.addItem(new Icon(VaadinIcon.MENU));

Then I would add subMenuItems to the menuItem, as such…

menuItem.getSubMenu().addItem(getMenuLabel("+ user"), e -> addUserDialog.open());