Headers & navigation / Headers & nav bars
Transparent Blur Header
Slim header with a wordmark-and-dot logo on the left, light text links (Shop, Science, Learn) and right-aligned Sign in plus a snow-white pill Cart button. Sits transparent over photography and becomes frosted with 19px backdrop blur.
Rebuilt from seed.com/products in the Verdant Lab Editorial style.
Looks exactly like seed.com: brings its fonts and colours, namespaced so your own theme stays untouched.
Restyled to your project: uses your shadcn colours, fonts and radius, so it matches the rest of your app. Layout, type sizes and motion stay as designed.
Usage
Props: brand, links, imageSrc, headline, cartLabel. The header becomes frosted with a 19px backdrop blur over 300ms once the page scrolls; it renders standalone with defaults.
components/lifted-nav-bar.tsx
import { useEffect, useState } from "react"; type Props = { brand?: string; links?: string[]; imageSrc?: string; headline?: string; cartLabel?: string; }; export default function TransparentBlurHeader({ brand = "Fernlab", links = ["Shop", "Science", "Learn"], imageSrc = "https://yoink-app.fly.dev/stock/food-1.jpg", headline = "Feel steady every day with 20% off + a free tote.", cartLabel = "Cart", }: Props) { const [scrolled, setScrolled] = useState(false); useEffect(() => { const on = () => setScrolled(window.scrollY > 20); on(); window.addEventListener("scroll", on, { passive: true }); return () => window.removeEventListener("scroll", on); }, []); return ( <section className="relative isolate min-h-[325px] w-full overflow-hidden rounded-b-panel bg-ink font-sans text-canvas"> <img src={imageSrc} alt="Supplement jar on a wooden shelf" width={1600} height={1067} className="absolute inset-0 -z-20 h-full w-full object-cover" /> <div className="absolute inset-0 -z-10 bg-[linear-gradient(rgba(0,0,0,0.2)_7.6%,transparent_21.5%),linear-gradient(114deg,rgba(30,25,15,0.65)_10%,transparent_55%)]" /> <header className={`sticky top-0 z-20 flex items-center justify-between px-6 py-5 transition-[backdrop-filter,background-color] duration-300 ease-in-out md:px-12 ${scrolled ? "bg-frost-glass backdrop-blur-[19px]" : "bg-transparent backdrop-blur-none"}`} > <div className="flex items-center gap-6 md:gap-8"> <a href="#" className="flex items-center gap-1 text-lg focus-visible:outline focus-visible:outline-2 focus-visible:outline-canvas" aria-label={brand}> <span>{brand}</span> <span className="h-3.5 w-3.5 rounded-full bg-canvas" /> </a> <nav aria-label="Primary" className="hidden gap-8 sm:flex"> {links.map((l) => ( <a key={l} href="#" className="text-sm transition-opacity duration-ui-hover ease-ui-hover hover:opacity-60 focus-visible:outline focus-visible:outline-2 focus-visible:outline-canvas"> {l} </a> ))} </nav> </div> <div className="flex items-center gap-5"> <a href="#" className="text-sm transition-opacity duration-ui-hover ease-ui-hover hover:opacity-60">Sign in</a> <button className="rounded-pill bg-canvas px-5 py-3 text-sm text-ink transition-opacity duration-ui-hover ease-ui-hover hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-canvas"> {cartLabel} </button> </div> </header> <div className="px-6 pb-12 pt-24 md:px-20"> <h1 className="max-w-md text-4xl font-light leading-[1.05] tracking-tight md:text-5xl">{headline}</h1> </div> </section> ); }import { useEffect, useState } from "react"; type Props = { brand?: string; links?: string[]; imageSrc?: string; headline?: string; cartLabel?: string; }; export default function TransparentBlurHeader({ brand = "Fernlab", links = ["Shop", "Science", "Learn"], imageSrc = "https://yoink-app.fly.dev/stock/food-1.jpg", headline = "Feel steady every day with 20% off + a free tote.", cartLabel = "Cart", }: Props) { const [scrolled, setScrolled] = useState(false); useEffect(() => { const on = () => setScrolled(window.scrollY > 20); on(); window.addEventListener("scroll", on, { passive: true }); return () => window.removeEventListener("scroll", on); }, []); return ( <section className="relative isolate min-h-[325px] w-full overflow-hidden rounded-b-2xl bg-foreground font-sans text-background"> <img src={imageSrc} alt="Supplement jar on a wooden shelf" width={1600} height={1067} className="absolute inset-0 -z-20 h-full w-full object-cover" /> <div className="absolute inset-0 -z-10 bg-[linear-gradient(rgba(0,0,0,0.2)_7.6%,transparent_21.5%),linear-gradient(114deg,rgba(30,25,15,0.65)_10%,transparent_55%)]" /> <header className={`sticky top-0 z-20 flex items-center justify-between px-6 py-5 transition-[backdrop-filter,background-color] duration-300 ease-in-out md:px-12 ${scrolled ? "bg-foreground backdrop-blur-[19px]" : "bg-transparent backdrop-blur-none"}`} > <div className="flex items-center gap-6 md:gap-8"> <a href="#" className="flex items-center gap-1 text-lg focus-visible:outline focus-visible:outline-2 focus-visible:outline-background" aria-label={brand}> <span>{brand}</span> <span className="h-3.5 w-3.5 rounded-full bg-background" /> </a> <nav aria-label="Primary" className="hidden gap-8 sm:flex"> {links.map((l) => ( <a key={l} href="#" className="text-sm transition-opacity duration-verdant-ui-hover ease-verdant-ui-hover hover:opacity-60 focus-visible:outline focus-visible:outline-2 focus-visible:outline-background"> {l} </a> ))} </nav> </div> <div className="flex items-center gap-5"> <a href="#" className="text-sm transition-opacity duration-verdant-ui-hover ease-verdant-ui-hover hover:opacity-60">Sign in</a> <button className="rounded-full bg-background px-5 py-3 text-sm text-foreground transition-opacity duration-verdant-ui-hover ease-verdant-ui-hover hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-background"> {cartLabel} </button> </div> </header> <div className="px-6 pb-12 pt-24 md:px-20"> <h1 className="max-w-md text-4xl font-light leading-[1.05] tracking-tight md:text-5xl">{headline}</h1> </div> </section> ); }
Quality checks
Automated, in a real browser · 4d ago- Accessible: passedNo serious accessibility problems (axe-core): readable contrast, labelled buttons and images.
- Responsive: passedRenders at phone (390px), tablet (768px) and desktop width without sideways scrolling.
- Dark mode: passedStill readable when installed in your theme and switched to dark mode.
- Themeable: passedUses design tokens rather than hard-coded colours, so it follows your theme cleanly.
- Animates cleanly: doesn't applyDoesn't animate, so there's nothing to check.