Interface NavGroup


public interface NavGroup
A named grouping node in the navigation hierarchy. Root groups have a null parent.

Implement this interface on an annotation or enum to declare explicit group metadata. Pass a resolver via AppNavLayout.setViewNavGroupResolver(Function) so the framework can map each view to its group.

  • Method Summary

    Modifier and Type
    Method
    Description
    Supplier<com.vaadin.flow.component.icon.Icon>
    Returns a supplier that creates the icon for this group node, or null for no icon.
    Returns the parent group, or null if this is a root group.
    Display title for this group node.
  • Method Details

    • title

      String title()
      Display title for this group node.
    • icon

      Supplier<com.vaadin.flow.component.icon.Icon> icon()
      Returns a supplier that creates the icon for this group node, or null for no icon.

      Important: Icon is a live DOM component; each invocation of the returned supplier must produce a new Icon instance. Returning a supplier that hands back the same cached instance will cause the icon to be silently moved out of its current parent on each nav rebuild.

    • parent

      NavGroup parent()
      Returns the parent group, or null if this is a root group.