Header

A responsive header with navigation, search, and profile drawer

Preview
Interactive header component demo
Loading header...

📦 Installation

pnpm dlx shadcn@latest add https://zezo-ui.vercel.app/r/zezo-header.json

💡 Usage Example

import Header from "@/components/zezo/header/header";

<Header
  logo={{
    src: "/logo.webp",
    alt: "Logo",
    href: "/"
  }}
  menu={{
    menu: [
      {
        _id: "1",
        name: "Home",
        slug: "home",
        description: "",
        order: 1,
        icon: null,
        show_in_menu: true
      }
      // ... more menu items
    ],
    menuShowLimit: 4,      // optional
    menuPrefix: "/browse"  // optional
  }}
  search={{
    placeholder: "Search..." // optional
  }}
  profile={{ href: "/profile" }}  // optional
  user={currentUser}               // optional
  onLogout={handleLogout}          // optional
/>

📘 Props

PropTypeRequiredDescription
logoobjectYesLogo image with optional link
menuobjectYesNavigation menu items array
searchobjectNoSearch configuration (placeholder, onChange, href)
isLoadingbooleanNoLoading state for logout (default: false)
profileobjectNoProfile page configuration
userIWhoami | nullNoUser data (IWhoami from zezo-ott-api-client)
onLogout() => voidNoLogout handler function

✨ Features

🎨 Dark Mode

Automatic theme switching

📱 Responsive

Mobile & desktop layouts

🔍 Search

Built-in search functionality

👤 Profile

User profile drawer

💳 Subscription

Subscription status display

📋 Menu

Navigation with overflow handling