Showcase, tweak, and document the new @anvilkit/navbar component from a real demo app surface.
This route pairs a default demo, a live configuration panel, and copy-ready code examples. Preview links are intercepted here so you can experiment safely without leaving the page.
Included controls
Swap between text, image, and custom logo modes, add or remove menu items, and tune CTA variants, size, and state.
Code section
The live snippet tracks your current configuration, while the static examples cover minimal, composed, and responsive usage.
Current API
The navbar ships flat navigation links and action buttons. If you need dropdown-heavy navigation, compose it alongside the navbar rather than pushing that complexity into its base props.
Basic Demo
The default package state with a sample brand, centered links, and a single right-side signup action.
Left
Logo section
Accepts text or image props today, plus a React node override when the consumer wants a custom lockup.
Center
Navigation menu
Uses a concise items prop made of { label, href } objects and an optional active match.
Right
Action buttons
Multiple CTAs are supported with button variant, size, href, and disabled state baked into the array shape.
Interactive Configuration Panel
Modify the navbar in real time, then copy the generated JSX from the code examples section below.
Logo mode
text
Items
5 configured
Actions
1 configured
1. Increase the number of items to confirm the center section still wraps cleanly on smaller widths.
2. Swap between image and custom logo modes to verify the left slot stays vertically aligned.
3. Mix button variants and disabled states to see how the right action cluster balances visually.
Item 1
Configure the label and destination for this link.
Item 2
Configure the label and destination for this link.
Item 3
Configure the label and destination for this link.
Item 4
Configure the label and destination for this link.
Item 5
Configure the label and destination for this link.
Action 1
Keep button copy short so the cluster stays balanced.
Code Examples
Use the live snippet to mirror your current test case, then reference the examples below for minimal usage, composed dropdown patterns, and responsive page integration.
import { Navbar } from "@anvilkit/navbar";
export function SiteHeader() {
return (
<Navbar
logo={{ type: "text", text: "Underline", href: "/" }}
items={[
{ label: "Overview", href: "/overview" },
{ label: "Features", href: "/features" },
{ label: "Integrations", href: "/integrations" },
{ label: "Customers", href: "/customers" },
{ label: "Changelog", href: "/changelog" },
]}
actions={[
{ label: "Sign up", href: "/signup" },
]}
active="/features"
/>
);
}import { Navbar } from "@anvilkit/navbar";
export function MinimalHeader() {
return (
<Navbar
logo={{ type: "text", text: "Sandbox", href: "/" }}
items={[]}
actions={[]}
/>
);
}import { Navbar } from "@anvilkit/navbar";
import {
Menubar,
MenubarContent,
MenubarItem,
MenubarMenu,
MenubarTrigger,
} from "@anvilkit/ui/menubar";
export function DocsNavigation() {
return (
<div className="space-y-3">
<Navbar
logo={{ type: "text", text: "Underline Docs", href: "/" }}
items={[
{ label: "Guides", href: "/guides" },
{ label: "API", href: "/api" },
]}
actions={[{ label: "Launch app", href: "/app", variant: "secondary" }]}
active="/api"
/>
<Menubar>
<MenubarMenu>
<MenubarTrigger>Resources</MenubarTrigger>
<MenubarContent>
<MenubarItem>Components</MenubarItem>
<MenubarItem>Templates</MenubarItem>
<MenubarItem>Release notes</MenubarItem>
</MenubarContent>
</MenubarMenu>
</Menubar>
</div>
);
}import { Navbar } from "@anvilkit/navbar";
export function LandingHeader() {
return (
<header className="px-4 py-4 sm:px-6 lg:px-10">
<Navbar
logo={{
type: "image",
imageUrl: "/turborepo-light.svg",
alt: "Underline Studio",
href: "/",
}}
items={[
{ label: "Overview", href: "/overview" },
{ label: "Pricing", href: "/pricing" },
{ label: "Customers", href: "/customers" },
{ label: "Changelog", href: "/changelog" },
]}
actions={[
{ label: "Login", href: "/login", variant: "ghost", size: "default" },
{ label: "Start free", href: "/signup", variant: "secondary" },
]}
active="/pricing"
/>
</header>
);
}Layout balance
Verify the three sections stay readable with longer labels and multiple CTAs.
Prop ergonomics
Confirm the concise API still covers text, image, and custom logo use cases cleanly.
Composition story
Use the snippets to decide when the base navbar is enough and when surrounding UI primitives should take over.