Navbar
Renders a header.navbar and enhances a hand-authored .navbar-toggle (hamburger) and .navbar-mobile (mobile menu panel) inside it — resize-to-desktop auto-close, scroll shadow, outside-click/Escape, and URL-based active-link detection. A full set of compound subcomponents removes the markup boilerplate, but hand-authoring the raw .navbar-* tree (documented in MARKUP.md) works exactly the same — Navbar only ever looks for .navbar-toggle and .navbar-mobile by class name.
Usage
import {
Navbar, NavbarContainer, NavbarBrand, NavbarSpacer,
NavbarNav, NavbarLink, NavbarToggle,
} from '@mav-labs-inc/mavkit-react'
<Navbar>
<NavbarContainer>
<NavbarBrand href="/" logo="M">MavKit</NavbarBrand>
<NavbarSpacer />
<NavbarNav>
<NavbarLink href="/">Home</NavbarLink>
</NavbarNav>
<NavbarToggle />
</NavbarContainer>
</Navbar>Example
Props
Navbar
NavbarContainer
Required — the only flex/grid row inside Navbar. NavbarBrand, NavbarNav, NavbarToggle, etc. all need to live inside it or they render as unstyled block children.
NavbarBrand
Also accepts every native <a> attribute.
NavbarNav
NavbarLink
Also accepts every native <a> attribute.
NavbarToggle
Reads open state from the enclosing Navbar; clicks are handled by Navbar itself via event delegation, so no onClick wiring is needed.
Also accepts every native <button> attribute except className/type. Pass aria-controls yourself if toggling a hand-authored .navbar-mobile panel.
NavbarActions
NavbarDivider
A thin vertical rule between link groups and actions. Accepts only className.
NavbarSearch
Also accepts every native <input> attribute except className/type/id.
NavbarIconButton
Also accepts every native <button> attribute except className/type.
NavbarSpacer
flex: 1 — pushes everything after it to the right. Takes no props.
useNavbar()
Access the enclosing Navbar controller ({ isOpen }) — mainly useful for building a custom toggle.