Class NavBar

java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.navigation.NavBar
All Implemented Interfaces:
Component

public class NavBar extends HtmlTag
Navigation bar container with optional brand and item entries.

Mutable and not thread-safe. Child ordering and item state are assembled on this instance. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.

  • Constructor Details

    • NavBar

      public NavBar()
  • Method Details

    • create

      public static NavBar create()
    • withBrand

      public NavBar withBrand(String brand)
    • addItem

      public NavBar addItem(String text, String href)
      Adds an encoded href; supply an application-controlled or separately validated destination.
    • addItem

      public NavBar addItem(String text, String href, boolean active)
      Adds an active-state entry with a trusted/context-validated href, without Link's scheme policy.
    • addItem

      public NavBar addItem(Component component)
    • addItem

      public NavBar addItem(NavBar.NavItem navItem)
    • addUtilityItem

      public NavBar addUtilityItem(Component component)
    • addUtilityLink

      public NavBar addUtilityLink(String text, String href)
      Adds a utility link with an application-controlled or separately navigation-validated href.
    • addUtilityLink

      public NavBar addUtilityLink(String text, String href, boolean active)
      Adds a utility link with an application-controlled or separately navigation-validated href. Encoding does not validate schemes; null retains the empty-href fallback.
    • vertical

      public NavBar vertical()
    • horizontal

      public NavBar horizontal()
    • withClass

      public NavBar withClass(String className)
      Description copied from class: HtmlTag
      Overrides:
      withClass in class HtmlTag