Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/centered-logo-split-links.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/navbar/navbar2.tsx instead.
Usage
The file also exports navbar2Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Navbar2, navbar2Demo } from "@/components/blocks/navbar/navbar2"; export default function Page() { return <Navbar2 {...navbar2Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| wordmark | string | "Solace" | Logo text rendered centered in the header. |
| leftLinks | { label: string; href: string }[] | none | Nav links shown to the left of the logo. |
| rightLinks | { label: string; href: string }[] | none | Nav links shown to the right of the logo. |
| className | string | none | Extra classes for the outer header element. |
Behavior notes
- Fully static: no client-side state anywhere in this block.
- Left and right link groups are hidden below the md breakpoint; this block does not include a mobile menu trigger.
- Both link groups are plain Next.js Links with no real destinations until you supply your own hrefs.
More Navbar Blocks
View all →Simple Logo Links CTA
Wordmark on the left, a row of nav links, and a single CTA button on the right.
Mega Menu Dropdown
A trigger that opens a wide, multi-column mega menu panel below the header.
Navbar With Search
Logo, a few nav links, and a labeled search input with an inline icon.
Two Tier Utility Nav
A thin utility link row above the main navigation row.
Minimal Logo CTA Only
The simplest possible header: just a logo and a single CTA button, no nav links.
Mobile Hamburger Menu
Wordmark, a CTA button, and a hamburger icon that toggles a vertical nav list open and closed.