Skip to content
GetUrUI

Navbar

4 variantsNewPro
.md

Four site headers — a glass pill that springs wider on scroll, a full-width mega menu with sliding panels, a morphing preview dropdown and a minimal header with a side sheet — each with a working mobile menu.

navbarnavigationheadermenumega menumobile menusheetdropdownlanding

Pill

pill.tsx

Floating glass pill that springs wider once you scroll, revealing a CTA and a reading-progress line; links share a gliding hover highlight.

$npx shadcn@latest add @geturui-pro/navbar-pill
PropTypeDefaultDescription
brandstring"Relay"Product name; its first letter becomes the mark.
links{ label: string; href: string }[]—Primary links shown in the pill and the mobile menu.
activeHrefstring—Href of the current page; gets aria-current and a volt dot.
cta{ label: string; href: string }—Call to action revealed when the pill expands.
secondary{ label: string; href: string }—Quiet link such as Sign in.
thresholdnumber40Pixels scrolled before the pill expands.
scrollContainerRefObject<HTMLElement | null>—Watch this element's scroll instead of the window.
classNamestring—Classes for the sticky header wrapper.

Mega menu

mega-menu.tsx

Full-width header whose sections open one shared panel that slides left or right between sections, with a link grid and a feature card per section.

$npx shadcn@latest add @geturui-pro/navbar-mega-menu
PropTypeDefaultDescription
brandstring"Relay"Product name beside the mark.
sectionsMegaMenuSection[]—{ id, label, heading, links: { label, description, href, icon? }[], feature: { eyebrow, title, body, href, cta } }.
links{ label: string; href: string }[]—Plain links after the section triggers.
cta{ label: string; href: string }—Primary button on the right.
secondary{ label: string; href: string }—Quiet link such as Sign in.
classNamestring—Classes for the header.

Morphing

morphing.tsx

Centered nav whose single preview panel morphs its width, height and position between items while each item's feature preview crossfades in.

$npx shadcn@latest add @geturui-pro/navbar-morphing
PropTypeDefaultDescription
brandstring"Halcyon"Product name beside the mark.
itemsNavbarMorphingItem[]—{ id, label, title, body, preview: "canvas" | "agent" | "chart" | "security", width, links }. width sets the panel size in px.
cta{ label: string; href: string }—Button on the right.
classNamestring—Classes for the header.

Simple

simple.tsx

Minimal header with a sliding volt underline on links and a focus-trapped side sheet on small containers.

$npx shadcn@latest add @geturui-pro/navbar-simple
PropTypeDefaultDescription
brandstring"Tidepool"Product name beside the wave mark.
links{ label: string; href: string }[]—Primary links.
activeHrefstring—Href of the current page; the underline rests here.
cta{ label: string; href: string }—Primary button.
secondary{ label: string; href: string }—Quiet link such as Log in.
sheetNotestring—Line at the bottom of the mobile sheet.
sheetStrategy"fixed" | "absolute""fixed"fixed covers the viewport; absolute stays inside the nearest positioned ancestor.
classNamestring—Classes for the header.

Install the whole set

Installs every navbar variant at once. Each section above has its own command for a single variant.

Pro installs use your private registry token. Add the @geturui-pro registry once — setup guide. The command works after you get Pro.

$npx shadcn@latest add @geturui-pro/navbar

Also installs: Button

Accessibility

  • Menu triggers are real buttons with aria-expanded and aria-controls; Escape closes any open panel or menu and returns focus to its trigger.
  • Arrow Down on a desktop trigger opens its panel and moves focus to the first link; outside clicks close panels.
  • The mobile sheet is a modal dialog that traps Tab, and every spring falls back to a fade under reduced motion.

Related