DDBS UI
navigation

Search Nav Header

A light site header: a logo, plain text links and a wide pill search field on large screens, and a menu button opening a stacked panel with the links and search on phones. Harvested from Halcyon XR.

npx shadcn@latest add https://ui.develop-better-solutions.com/r/search-nav-header.json

Usage

search-nav-header-example.tsx
"use client";

import { SearchNavHeader } from "@dbs/ui";

const Logo = () => (
  <>
    <svg viewBox="0 0 24 24" className="size-6 transition-transform duration-200 group-hover:scale-105 lg:size-7" fill="none" stroke="currentColor" strokeWidth={1.8} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
      <path d="M12 2L21 7.2V16.8L12 22L3 16.8V7.2L12 2Z" />
      <path d="M12 12V22M12 12L21 7.2M12 12L3 7.2" />
    </svg>
    <span className="text-[17px] font-bold tracking-tight lg:text-[20px] lg:font-semibold">Northwind XR</span>
  </>
);

export default function SearchNavHeaderExample() {
  return (
    <SearchNavHeader
      logo={<Logo />}
      logoLabel="Northwind XR, back to top"
      items={[
        { label: "Home", href: "#hero" },
        { label: "About", href: "#about" },
        { label: "Services", href: "#services" },
        { label: "Contact", href: "#footer" },
      ]}
    />
  );
}