Skip to content
Uxelith
Sign in
Prov1.0.0Marketing blocks

Site Header

A scroll-aware site header: a highlight that glides between links, menus with descriptions, a bar that floats into a rounded island (and can tuck away while you read), and an animated mobile menu.

Installs with Uxelith ProHow
Licence
Pro
Packages
3
Updated
10 Oct 2026
Live

Installation

Usage

example.tsx
import { SiteHeader } from "@/components/site-header"

export default function Page() {
  return <SiteHeader />
}

Props

PropTypeDefaultDescription
brand / homeHrefstring"Northwind" / "/"Name beside the mark, and where it links.
links{ label; href?; items?: { label; href; description? }[] }[]4 examplesMain navigation; items turns an entry into a menu.
currentHrefstring—Marks that link with aria-current="page".
secondaryAction / primaryAction{ label; href } | nullSign in / Start freeQuiet link and main button; null hides either.
stickybooleantrueStay at the top, gaining a backdrop after scrolling.
floatingbooleantrueOnce scrolled, shrink into a floating rounded bar.
hideOnScrollbooleanfalseSlide away while scrolling down; return on scroll up.
scrollContainerRefObject<HTMLElement>windowThe element that scrolls, when it isn't the window.

Accessibility

  • A labelled <nav>; the current page has aria-current="page".
  • Menus follow the disclosure pattern: buttons with aria-expanded and aria-controls; Escape, clicking away or tabbing out closes them and Escape returns focus.
  • The mobile menu button has aria-expanded and aria-controls; the closed menu is inert; Escape or choosing a link closes it.
  • Movement is instant under prefers-reduced-motion.

Changelog

  1. v1.0.0Latest

    First release.

More in Marketing blocks

All 8 in Marketing blocks
  • Marketing blocksPro

    Bento Feature Grid

    A features section as a bento grid: five tiles with live CSS illustrations (motion curves, a theme cycling, frameworks, a typing terminal, a focus ring stepping with Tab), a shared spotlight and scroll-driven entrances.

  • Marketing blocksPro

    FAQ Section

    Frequently asked questions: a large heading, an animated accordion, an optional search that narrows and highlights answers, a contact card and FAQPage structured data.

  • Marketing blocksFree

    Hero Section

    A landing-page hero: a large headline that comes into focus, a magnetic call to action, customer marks and a live product shot with a self-drawing chart, a visiting cursor and floating cards.