Vaadin MenuBar in 14


i was just wondering how to add a menu separator in the new MenuBar in vaadin 14.

The page for MenuBar v1.0.3 shows a screenshot with a separator in.

I would try:

menuBar.addItem(new Hr());

Here’s also an example of adding a separator:

See the “Item Components” example on that page.

The relavant snippet is:

// Components can be added to submenus as well:
profile.getSubMenu().add(new Hr());