Component
Navbar
Build responsive headers with brand, nav links, actions, sticky or glass styles, and a progress slot.
Interactive preview
Usage
Import the component entry and start with its smallest complete example.
Import
import { Navbar } from "@chitrank2050/monoline-ui/navbar"Basic usage
<Navbar
brand="Chitrank"
layout="contained"
links={[
{ href: "/blog", label: "Blog" },
]}
actions={<Button size="sm">Contact</Button>}
sticky
glass
progress={
<Progress
followScroll
size="sm"
className="absolute bottom-0 left-0 right-0 z-50 rounded-none bg-transparent"
/>
}
/>
<Navbar layout="extended" sticky glass progress={<Progress followScroll size="sm" className="absolute bottom-0 left-0 right-0 z-50 rounded-none bg-transparent" />}>
<Navbar.Brand href="/" mark={<span />} textStyle="monoline">
monoline/ui
</Navbar.Brand>
<Navbar.Nav>
<Navbar.Link href="/blog">Blog</Navbar.Link>
</Navbar.Nav>
<Navbar.Actions>
<Button size="sm">Contact</Button>
</Navbar.Actions>
</Navbar>Usage guidance
Choose the component for its interaction model and semantics before customizing its appearance.
Navbar provides a responsive site header for a brand, primary links, and optional actions.
Navigation belongs in an application sidebar, has nested levels, or needs built-in disclosure state.
Navbar provides header and nav landmarks, labels the navigation, and marks the active link with aria-current page.
This component can render without adding a Monoline client boundary when its children and props are serializable.
API reference
Props, slots, and callbacks available on this component.
Design tokens
Theme variables this component reads for color, spacing, and motion.
Implementation
The source used by the example above, including any state it needs.
import { Navbar } from "@chitrank2050/monoline-ui/navbar"
import { Button } from "@chitrank2050/monoline-ui/button"
import { Progress } from "@chitrank2050/monoline-ui/progress"
export function SiteHeader() {
return (
<Navbar
brand="Chitrank"
layout="contained"
brandTextStyle="cursive"
links={[
{ href: "/blog", label: "Blog" },
]}
actions={<Button size="sm">Contact</Button>}
sticky
glass
progress={
<Progress
followScroll
size="sm"
className="absolute bottom-0 left-0 right-0 z-50 rounded-none bg-transparent"
/>
}
/>
)
}Related documentation
Compare related components or review the package and theme setup.