Just the obvious disclaimer: Vaadin 23 is End of Free Support; so upgrading to Vaadin 24 is highly recommend. There you can use the official SideNav component.
In previous versions there was the semi official add-on which could be used GitHub - vaadin/vcf-nav - but upgrading should be higher priority.
Thanks Christian. SideNav seems to be what we need. Unfortunately we can’t upgrade to vaadin 24 yet due to all the dependency changes to spring boot, etc. Will be able to do that later this year hopefully.
The SideNav component automatically adds toggle buttons if you configure it with a hierarchy. See Side Navigation | Components | Vaadin Docs for an example. You can control whether sections are expanded by default by setting the expanded property (item.setExpaned(true) from Java).
As far as my test application goes, the default behaviour of the SideNavItems seems to be to expand the parent item if it’s the view you have currently navigated into. Usually this isn’t really an issue, but I have just been engaged in a discussion where a user wanted to prevent this, so I thought it prudent to point it out.