Arc
ComponentsBlocksDocsPricingTry the demo
Introduction
Installation
Theming
Motion
AI and MCP
Changelog
Metrics dashboard
KPI drilldownNew
Metric explorer
Revenue explorer
MRR waterfall
Cohort retention
Usage forecast
Journey flow
Connected scatterNew
Market terminalNew
Budget varianceNew
Small multiplesNew
Line replayNew
AI chatNew
AI composer
Agent runNew
SidebarPro4
Page header
Command palette
Notification center
Empty states
Login and sign up5
OTP input
Multi-step formPro
Settings page
Security settings
Billing overview
Usage billingNew
Team members
Invite peopleNew
Team directory
Roles and permissions
API keys
Webhooks
Integrations
Plan comparison
Pricing calculatorNewPro
Usage pricingPro
Cart drawerNewPro
Checkout summaryNewPro
Invoice studio
Wallet card
Product listingNew
Product detailNew
Inbox triage
Support conversation
Support widget
File upload
Media playerPro
Week calendarNew
Availability picker
Project board
Release readiness
Hero sectionNew
Hero signupNewPro
Scroll storyNewPro
Spotlight gridNewPro
Feature bentoNewPro
Comparison tableNew
Logo marquee
Studio perspectivesPro
Stats bandNew
Changelog feed
FAQ sectionNew
Contact sectionNew
Team showcasePro
Blog gridNew
Site headerNew
Site footerNew
CTA sectionNew
Newsletter signupNew
Revenue globe
Customer galaxy
Semantic zoom
Layout morph
What’s new80 new
BlocksSite header

Site header

A sticky website header that turns solid on scroll, with a gliding active link, mega menu panels, and a mobile sheet.

$pnpm dlx shadcn@latest add @uiarc/site-header
Live block · sample data

When to use

  • The top bar of a marketing site, landing page, or docs site.
  • Product sites with grouped destinations that deserve a mega menu with a feature card.
  • Pages that need one clear sign-up action in the header.

When not to use

  • Use workspace-sidebar or sidebar-rail inside a signed-in app.
  • Use morph-nav for a single-surface animated navigation with built-in search.
  • Use menubar for application commands.

Installation

Add Site header with the shadcn CLI, or copy the source by hand.

$pnpm dlx shadcn@latest add @uiarc/site-headerpnpm dlx shadcn@latest add @uiarc/site-header

Adds the block and its local dependencies, and installs motion, lucide-react. First time? Add the @uiarc registry to components.json, or use the full URL:

Usage

Use this as a starting point and replace the sample data with your own.

example.tsx
1import { SiteHeader } from "@/registry/blocks/site-header/site-header";2 3export function MarketingHeader() {4  return (5    <SiteHeader6      variant="simple"7      brand={{ name: "Acme", href: "/", mark: <Logo /> }}8      items={[9        { value: "product", label: "Product", href: "/product" },10        { value: "pricing", label: "Pricing", href: "/pricing" },11        { value: "docs", label: "Docs", href: "/docs" },12      ]}13      current="pricing"14      secondaryAction={{ label: "Sign in", href: "/sign-in" }}15      primaryAction={{ label: "Start free", href: "/sign-up" }}16    />17  );18}
Built fromMotion

API reference

2 parts. The first is the root.

SiteHeader

A marketing site header in three variants. It turns solid once the page scrolls, and on narrow containers the links move into a sheet.

PropTypeDefaultDescription
variant"simple" | "centered" | "mega""mega"`simple` puts links beside the brand, `centered` centers them in a quiet capsule, `mega` opens panels for items with links.
brand{ name: string; href?: string; mark?: ReactNode }{ name: "Arc" }Brand at the start of the bar.
itemsSiteHeaderItem[]siteHeaderExampleItemsTop level destinations: { value, label, href?, links?, feature? }. Items with links open a panel in the mega variant.
currentstring–Value of the item that holds the current page (controlled).
defaultCurrentstring–Initial current item when uncontrolled.
onCurrentChange(value: string) => void–Called when a destination inside an item is chosen, with that item's value.
onNavigate(destination: { label: string; href?: string; section?: string }) => void–Called for every destination: items, panel links, the brand, and actions with an href.
secondaryAction{ label: string; href?: string; onClick?: () => void } | null{ label: "Sign in" }A quiet action before the primary one. Pass null to hide it.
primaryAction{ label: string; href?: string; onClick?: () => void } | null{ label: "Get Arc" }The one primary action. Pass null to hide it.
stickybooleantrueSticks to the top of its scroll container.
scrollContainerRefObject<HTMLElement | null>–The element that scrolls, when it is not the window.
scrollThresholdnumber8Pixels of scroll before the background turns solid.
labelstring–Accessible name of the navigation landmark.
classNamestring–Extra class on the header.

SiteHeaderBlock

Default export: a preview with a variant switcher over a small scrolling page.

PropTypeDefaultDescription
variantSiteHeaderVariant"mega"Initial variant.

Keyboard interactions

ArrowLeftorArrowRight
Move between top level items in the mega variant.
ArrowDown
On an item with links, opens its panel and focuses the first link.
ArrowUporArrowDownorHomeorEnd
Move between links inside an open panel.
Escape
Closes the open panel or the mobile sheet and returns focus to its trigger.

Accessibility

  • A labelled nav landmark; the current item is marked with aria-current.
  • Panel triggers expose aria-expanded; outside presses and Escape close whichever layer is open.
  • The mobile sheet locks page scroll while open and returns focus to the menu button when closed.

Motion

  • Mega panels open on hover after a short intent delay and close after a leave grace; switching items morphs the panel to the new content.
  • The header background turns solid past scrollThreshold.
  • Reduced motion removes panel travel and uses fades.

Responsive behavior

  • It is a container-query component: below 760px of its own width the links, panels, and wide actions hide and a menu button opens a sheet.
  • From 760px the sheet and scrim are removed; widening the container closes an open sheet.
  • Hover-to-open panels only apply to fine pointers.

Performance

  • Panels mount only while open; the scroll listener updates a single solid-state attribute.
  • Feature images use next/image with sizes set, so they load only when a panel opens.

Notes for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Choose it for marketing and docs sites. For in-app navigation use workspace-sidebar or sidebar-rail.
  • The defaults are Arc sample content; always pass brand, items, and actions for real sites.
  • Links render as anchors when an href is set; wire onNavigate for client-side routing or analytics.
  • The mega variant uses next/image for feature images; allow their host in your image config.
/components/blocks/site-header/markdown

The full library index for assistants is at /llms.txt.

Related

Morph navProComponentA navigation bar that morphs into rich menus, search, and a compact state as one surface.Site footerBlockA website footer with link columns and newsletter, a minimal layout, and a large fading Arc mark.Hero sectionBlockThree full screen SaaS heroes: a live dashboard rising from the bottom edge over a drifting mesh, a workflow graph that routes sample events node by node, and editorial type over a mesh gradient.BreadcrumbComponentShow where a page sits in a hierarchy.
PreviousCheckout summaryNextSite footer
Arc · 75 block pagesllms.txt

On this page

  • Preview
  • When to use
  • When not to use
  • Installation
  • Usage
  • API reference
  • Keyboard
  • Accessibility
  • Motion
  • Responsive behavior
  • Performance
  • Notes for AI
  • Related
View as Markdown

Product