Navbar
The global navigation bar that sits fixed at the top of every TanStack surface. It's a layout organism — brand, primary mega-menu navigation, and a utility cluster — and adapts from a full desktop bar to a compact mobile menu. Source: src/components/Navbar.tsx.
Anatomy
A static replica built from the production classes and the shared --navbar-height token — toggle a device size, or leave it on Auto to watch it reflow (container queries mirror the real 900px / 1120px breakpoints). The numbered regions below label the parts of the bar, left to right.
Logo mark and wordmark, linking home; right-clicking opens the brand context menu (logo assets). Sits in the left flex-1 slot, so the primary nav lands centered.
Libraries, Blog, Community, Tools, Merch, and Support — each a hover/focus mega-menu — with the search button in its own slot right after them. Collapses to the mobile menu below 900px.
Social stack, theme toggle, cart, the AI dock, and auth controls, pushed to the right edge by a flex-1 — plus the hamburger trigger on mobile.
Layout & spacing
The tokens and utilities that give the bar its rhythm. Height is driven by a CSS variable so sticky offsets across the site stay in sync.
--navbar-height: 58pxpx-3 py-2 · min-[900px]:px-5gap-2 · min-[1120px]:gap-4gap-1gap-2 · sm:gap-2.5px-2 py-2 · min-[1120px]:px-3text-xs · min-[1120px]:text-[13px]bg-white/90 dark:bg-black/90scroll-reactive hairline — bg-border-subtle, fades in on scrollResponsive behavior
Two breakpoints reshape the bar as space tightens.
Full primary navigation with mega-menu dropdowns; the hamburger is hidden.
Social links join the utility cluster and region gaps widen for extra breathing room.
Primary nav collapses to a hamburger that opens a full-height sliding panel with Search, Ask AI, and Sign In.
Source
This organism lives in the app, not the copy-paste registry — it's wired to routing, auth, and cart state.
src/components/Navbar.tsxMounted once in __root.tsx as <Navbar>{children}</Navbar>. Menu contents are defined in the NAV_GROUPS config at the top of the file.