Skip to content

Header

Header Split

Sticky header with brand and links at the left and two rolling-label buttons at the right; menu inside the bar below 1024px.

Layout and motion from the Findit template — see it in context

Installation

$ npx shadcn@latest add https://framebrick.co/r/blocks/header-split.json

Usage

import { HeaderSplit } from "@/components/header-split";
import { usePathname } from "next/navigation";

// in a client component
<HeaderSplit
  current={usePathname()}
  brand={{ name: "Harbor Homes", href: "/" }}
  links={[{ label: "Home", href: "/" }, { label: "Properties", href: "/properties" }]}
  actions={[{ label: "Contact us", href: "/contact" }, { label: "Submit property", href: "/submit" }]}
/>

Props

PropTypeDefaultDescription
brand{ name, href, logo? }Harbor HomesAt the left; logo (any node) replaces the name.
links{ label, href }[]5 linksBeside the brand from 1024px, in the menu below.
actions[{ label, href }, { label, href }]—Filled and outlined buttons at the right from 1024px, in the menu below.
currentstring""Path of the current page (pass usePathname()). A link is current on its page and below it.
classNamestring—Classes for the <header>.
  • Sticky, with a line under the bar. Links go from muted to foreground on hover while a 1px line grows under them (spring bounce 0.2, 0.4s); the current link has no line.
  • Buttons roll their label on hover and focus (flip-button). Below 1024px the menu opens inside the bar by height; choosing a link or Escape closes it.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this block in your own project.

Create a React + Tailwind CSS + Motion block called HeaderSplit (Next.js).
- A sticky <header> (top-0, z-50, bg-background, border-b) with a container mx-auto max-w-(--container) px-(--gutter); a row h-16 (lg:h-18)
  justify-between gap-12: the brand (font-heading text-lg semibold), from 1024px a <nav aria-label="Main"> filling the row (links gap-8)
  and two buttons (filled + outline, gap-2.5); below 1024px a "Menu / Close" button (aria-expanded, aria-controls).
- Links: text-sm font-medium muted, foreground on hover; a 1px line under the link grows from 0 to 100% width with a spring (bounce 0.2,
  0.4s); the current link (aria-current="page") is foreground with no line.
- Buttons: shadcn-style; the label sits in a 20px window and rolls up 28px while a copy rises from below (spring bounce 0, 0.4s).
- Menu below 1024px: inside the bar, height 0 → auto (spring bounce 0, 0.4s; fade in 0.25s after 0.1s, out 0.15s): links stacked gap-7, then
  the two buttons; close on link click and Escape.
- Only shadcn variables and block tokens.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy