Navbar

The bar across the top of a page. Pure layout: no component library renders this one, and what goes in it is buttons, links and menus.

alpha The class names and states here are stable. The look is not: these styles can change in a minor release, without a major version bump.

ClassDoes what
navbarThe bar: a padded row with a rule under it
navbar-startLeft group, pushes the rest to the end
navbar-endRight group
menubarA row of menu triggers, for Kobalte's Menubar

Basic

Same markup in both builds
<div class="navbar">
  <div class="navbar-start">
    <strong>Sparkstone</strong>
    <a href="#" class="link">Docs</a>
    <a href="#" class="link">Pricing</a>
  </div>
  <div class="navbar-end">
    <button class="btn btn-ghost">Sign in</button>
    <button class="btn">Start</button>
  </div>
</div>

With a menubar

Kobalte's Menubar is role="menubar", so the row styles itself. Its triggers are divs with no role, so they take .menu-item, and each menu that opens is the same dropdown panel.

<div class="navbar">
  <div class="navbar-start">
    <strong>Editor</strong>
    <div class="menubar">
      <span class="menu-item">File</span>
      <span class="menu-item menu-active">Edit</span>
      <span class="menu-item">View</span>
    </div>
  </div>
</div>
<div class="dropdown-content menu" style="width: 12rem; margin-top: 0.25rem">
  <span class="menu-item">Undo <span class="menu-shortcut">⌘Z</span></span>
  <span class="menu-item">Redo <span class="menu-shortcut">⇧⌘Z</span></span>
</div>

Navigation menu and context menu

Two more Kobalte components reuse what is already here, so they need no classes of their own:

<NavigationMenu class="menubar">
  <NavigationMenu.Menu>
    <NavigationMenu.Trigger class="menu-item">Product</NavigationMenu.Trigger>
    <NavigationMenu.Portal>
      <NavigationMenu.Content class="dropdown-content menu">
        <NavigationMenu.Item class="menu-item">Overview</NavigationMenu.Item>
        <NavigationMenu.Item class="menu-item">Changelog</NavigationMenu.Item>
      </NavigationMenu.Content>
    </NavigationMenu.Portal>
  </NavigationMenu.Menu>
</NavigationMenu>
<ContextMenu>
  <ContextMenu.Trigger class="card">Right-click me</ContextMenu.Trigger>
  <ContextMenu.Portal>
    <ContextMenu.Content>
      <ContextMenu.Item>Rename</ContextMenu.Item>
      <ContextMenu.Item>Delete</ContextMenu.Item>
    </ContextMenu.Content>
  </ContextMenu.Portal>
</ContextMenu>