Glass nav that shrinks

Wide and open at the top; after scrolling, a narrow glass bar.

UniversalUsed in production
Install
npx finepieces add shrinking-nav
Or with the shadcn CLI ›
npx shadcn@latest add https://finepieces.net/r/shrinking-nav.json

Scroll inside the panel

import { ShrinkingNav } from "@/components/fine-pieces/shrinking-nav";

export default function Example() {
  return (
    <ShrinkingNav brand="Kofi & Co" links={[{ label: "Menu", href: "#" }, { label: "Beans", href: "#" }, { label: "Locations", href: "#" }]} cta={{ label: "Order", href: "#" }}>
      <div className="grid gap-3.5 px-[26px] pb-8 pt-2.5">
        <img src={"/images/cafe-3.webp"} alt="" className="h-[340px] w-full rounded-xl object-cover" />
        <p className="py-5 font-display text-[30px] font-medium text-[#9A8F83]">Scroll this panel.</p>
        <img src={"/images/cafe-1.webp"} alt="" className="h-[340px] w-full rounded-xl object-cover" />
        <img src={"/images/eten-2.webp"} alt="" className="h-[340px] w-full rounded-xl object-cover" />
      </div>
    </ShrinkingNav>
  );
}