Library MCP Setup About Template Factory ↗
← Library / Navigation UI SDK Agentic

Sticky Glass Navbar

Translucent header bar built with UI SDK NavigationMenu, Popover quick-connect panel, and Button actions with keyboard arrow navigation.

Install UI SDK & packages

npm install @ui-sdk/react @ui-sdk/core lucide-react

Give your agent the UI SDK skill

npx skills add vercel-labs/ui --skill ui-sdk

UI SDK entries: @ui-sdk/react/navigation-menu @ui-sdk/react/popover @ui-sdk/react/button
"use client";

import * as React from "react";
import { Snowflake, Terminal } from "lucide-react";
import { Button } from "@ui-sdk/react/button";
import {
  NavigationMenu,
  NavigationMenuItem,
  NavigationMenuLink,
  NavigationMenuList,
} from "@ui-sdk/react/navigation-menu";
import {
  Popover,
  PopoverClose,
  PopoverContent,
  PopoverTitle,
  PopoverTrigger,
} from "@ui-sdk/react/popover";

export function StickyGlassNavbar({
  brand = "Snow",
  onCta,
}: {
  brand?: string;
  onCta?: () => void;
}) {
  return (
    <header className="sticky top-0 z-40 w-full rounded-2xl border border-border bg-card/85 px-5 py-3 backdrop-blur-xl">
      <div className="mx-auto flex max-w-5xl items-center justify-between gap-4">
        <div className="flex items-center gap-2.5 font-extrabold tracking-tight text-foreground">
          <span className="grid h-8 w-8 place-items-center rounded-lg bg-sky-400 text-slate-950">
            <Snowflake className="h-4 w-4" aria-hidden="true" />
          </span>
          <span>{brand}</span>
        </div>

        <NavigationMenu aria-label="Primary navigation">
          <NavigationMenuList className="flex items-center gap-5 text-sm font-medium text-muted-foreground">
            <NavigationMenuItem>
              <NavigationMenuLink href="/library" className="transition hover:text-foreground">
                Library
              </NavigationMenuLink>
            </NavigationMenuItem>
            <NavigationMenuItem>
              <NavigationMenuLink href="/mcp-docs" className="transition hover:text-foreground">
                MCP Setup
              </NavigationMenuLink>
            </NavigationMenuItem>
            <NavigationMenuItem>
              <NavigationMenuLink href="/about" className="transition hover:text-foreground">
                About
              </NavigationMenuLink>
            </NavigationMenuItem>
          </NavigationMenuList>
        </NavigationMenu>

        <div className="flex items-center gap-2">
          <Popover>
            <PopoverTrigger className="inline-flex h-9 cursor-pointer items-center gap-1.5 rounded-lg border border-border bg-secondary px-3 text-xs font-semibold text-foreground hover:border-sky-400/50">
              <Terminal className="h-3.5 w-3.5 text-sky-400" aria-hidden="true" />
              Quick MCP link
            </PopoverTrigger>
            <PopoverContent
              sideOffset={8}
              className="w-72 rounded-xl border border-border bg-card p-4 shadow-2xl"
            >
              <PopoverTitle className="text-xs font-bold text-foreground">Snow MCP Endpoint</PopoverTitle>
              <code className="mt-2 block rounded-lg bg-background px-2.5 py-2 font-mono text-[11px] text-sky-300">
                https://snow.wynter.ai/mcp
              </code>
              <PopoverClose className="mt-3 inline-flex h-7 cursor-pointer items-center rounded-md border border-border px-2.5 text-xs font-semibold text-muted-foreground hover:text-foreground">
                Close
              </PopoverClose>
            </PopoverContent>
          </Popover>

          <Button
            onClick={onCta}
            className="inline-flex h-9 cursor-pointer items-center rounded-lg bg-sky-400 px-4 text-xs font-bold text-slate-950 transition hover:bg-sky-300"
          >
            Open Library
          </Button>
        </div>
      </div>
    </header>
  );
}

export default StickyGlassNavbar;