Skip to content

Header Global

Global top bar: logo, entity switcher (Radix dropdown), centered search with ⌘K hint, help + notifications (count) icon buttons and a user avatar menu (profile, settings, sign out).

neo-corporate/layout/header-global
Open ↗

Source

"use client";

import { DropdownMenu } from "radix-ui";
import { Bell, ChevronDown, HelpCircle, LogOut, Search, Settings, User } from "lucide-react";
import { cn } from "@/lib/utils";

export interface HeaderGlobalProps {
  brand?: string;
  brandHref?: string;
  entity?: string;
  entities?: string[];
  onEntityChange?: (entity: string) => void;
  notifications?: number;
  user?: { name: string; email: string; initials: string };
  da?: string;
  className?: string;
}

function LedgerlyMark({ className }: { className?: string }) {
  return (
    <svg aria-hidden viewBox="0 0 28 28" className={cn("size-7 shrink-0", className)}>
      <rect width="28" height="28" rx="7" fill="var(--da-primary)" />
      <path d="M8 8v12h12" stroke="var(--da-primary-fg)" strokeWidth="2.6" fill="none" strokeLinecap="round" />
      <path d="M13 15h7M13 11h7" stroke="var(--da-primary-fg)" strokeWidth="2.2" strokeLinecap="round" opacity=".7" />
    </svg>
  );
}

/** Global top bar: logo, entity switcher (Radix dropdown), centered search with ⌘K hint, help + notifications (count) icon buttons and a user avatar menu (profile, settings, sign out). */
export function HeaderGlobal({
  brand = "Ledgerly",
  brandHref = "/",
  entity = "Ledgerly Inc. (US)",
  entities = ["Ledgerly Inc. (US)", "Ledgerly GmbH (DE)", "Ledgerly Ltd (UK)"],
  onEntityChange,
  notifications = 3,
  user = { name: "Priya Raman", email: "priya@northwind.com", initials: "PR" },
  da = "neo-corporate",
  className,
}: HeaderGlobalProps) {
  const menu =
    "da-stroke z-50 min-w-52 rounded-da-md bg-da-surface p-1 text-da-surface-fg shadow-da-lg transition-opacity duration-(--da-duration) starting:opacity-0";
  const item =
    "flex cursor-default items-center gap-2 rounded-da-sm px-2 py-1.5 text-sm outline-none data-highlighted:bg-da-muted [&_svg]:size-4 [&_svg]:text-da-muted-fg";
  const iconBtn = "da-focus relative grid size-9 place-items-center rounded-da-md text-da-muted-fg hover:bg-da-muted hover:text-da-fg";
  return (
    <header className={cn("sticky top-0 z-30 flex h-14 items-center gap-3 border-b border-da-border bg-da-surface px-4 text-da-surface-fg", className)}>
      <a href={brandHref} aria-label={`${brand} home`} className="da-focus rounded-da-sm">
        <LedgerlyMark />
      </a>
      <DropdownMenu.Root modal={false}>
        <DropdownMenu.Trigger className="da-focus inline-flex h-9 max-w-44 items-center gap-1.5 rounded-da-md px-2 text-sm font-semibold hover:bg-da-muted sm:max-w-none">
          <span className="truncate">{entity}</span>
          <ChevronDown aria-hidden className="size-4 shrink-0 text-da-muted-fg" />
        </DropdownMenu.Trigger>
        <DropdownMenu.Portal>
          <DropdownMenu.Content data-da={da} sideOffset={6} align="start" className={menu}>
            <DropdownMenu.Label className="px-2 py-1.5 text-[11px] font-semibold tracking-da-label text-da-muted-fg uppercase">
              Switch entity
            </DropdownMenu.Label>
            <DropdownMenu.RadioGroup value={entity} onValueChange={onEntityChange}>
              {entities.map((e) => (
                <DropdownMenu.RadioItem key={e} value={e} className={cn(item, "data-[state=checked]:font-semibold data-[state=checked]:text-da-primary")}>
                  {e}
                </DropdownMenu.RadioItem>
              ))}
            </DropdownMenu.RadioGroup>
          </DropdownMenu.Content>
        </DropdownMenu.Portal>
      </DropdownMenu.Root>
      <label className="da-stroke mx-auto hidden h-9 w-full max-w-md items-center gap-2 rounded-da-md bg-da-surface-2 px-3 text-sm focus-within:border-da-primary md:flex">
        <Search aria-hidden className="size-4 text-da-muted-fg" />
        <span className="sr-only">Search</span>
        <input placeholder="Search invoices, customers, payments…" className="min-w-0 flex-1 bg-transparent outline-none placeholder:text-da-muted-fg" />
        <kbd className="rounded-da-sm border border-da-border bg-da-surface px-1.5 font-da-mono text-[11px] text-da-muted-fg">⌘K</kbd>
      </label>
      <div className="ml-auto flex items-center gap-1 md:ml-0">
        <button type="button" aria-label="Search" className={cn(iconBtn, "md:hidden")}>
          <Search aria-hidden className="size-[18px]" />
        </button>
        <button type="button" aria-label="Help" className={cn(iconBtn, "max-sm:hidden")}>
          <HelpCircle aria-hidden className="size-[18px]" />
        </button>
        <button type="button" aria-label={`Notifications (${notifications} unread)`} className={iconBtn}>
          <Bell aria-hidden className="size-[18px]" />
          {notifications > 0 && <span aria-hidden className="absolute top-1.5 right-1.5 size-2 rounded-full bg-da-danger ring-2 ring-da-surface" />}
        </button>
        <DropdownMenu.Root modal={false}>
          <DropdownMenu.Trigger
            aria-label="Account menu"
            className="da-focus ml-1 grid size-8 place-items-center rounded-full bg-da-primary text-xs font-semibold text-da-primary-fg"
          >
            {user.initials}
          </DropdownMenu.Trigger>
          <DropdownMenu.Portal>
            <DropdownMenu.Content data-da={da} sideOffset={6} align="end" className={menu}>
              <div className="px-2 py-2 text-sm">
                <p className="font-semibold">{user.name}</p>
                <p className="text-xs text-da-muted-fg">{user.email}</p>
              </div>
              <DropdownMenu.Separator className="my-1 h-px bg-da-border" />
              <DropdownMenu.Item className={item}>
                <User aria-hidden /> Profile
              </DropdownMenu.Item>
              <DropdownMenu.Item className={item}>
                <Settings aria-hidden /> Workspace settings
              </DropdownMenu.Item>
              <DropdownMenu.Separator className="my-1 h-px bg-da-border" />
              <DropdownMenu.Item className={item}>
                <LogOut aria-hidden /> Sign out
              </DropdownMenu.Item>
            </DropdownMenu.Content>
          </DropdownMenu.Portal>
        </DropdownMenu.Root>
      </div>
    </header>
  );
}

export default HeaderGlobal;

modules/neo-corporate/layout/header-global/index.tsx

Props

PropTypeDefaultDescription
brandstring—Brand name.
brandHrefstring—Brand link target.
entitystring—Entity.
entitiesstring[]—Entities.
onEntityChange(entity: string) => void—Callback.
notificationsnumber—Notifications.
user{ name: string; email: string; initials: string }—User.
dastring—DA scope applied to portalled content.
classNamestring—Extra classes on the root.

Other app header variants in Neo Corporate

App header in other art directions

App Header

Two-tier app header: top bar with breadcrumbs, ⌘K search field, notification bell with counter and avatar; page band with big title, meta line, primary action and folder-style tabs.

BrutalistApp header

Header Compact

Dense 56px app header built from ruled cells: title with count chip, view tabs (yellow active cell), filter search, ink 'New' cell, and an optional strip of active filter chips.

BrutalistApp header

Header Editor

Document/editor header: back cell, version chip, inline-editable uppercase title, save-status chip (saved/saving/unsaved), Preview cell and a yellow Publish cell; actions wrap to a full-width bar on mobile.

BrutalistApp header

Header Stats

Dashboard welcome header: yellow band with eyebrow, big greeting, status sentence and two pressable actions, over a ruled KPI strip (2×2 on mobile, 4 across on desktop) with green delta chips.

BrutalistApp header

App Header

Floating frosted pill top bar (search with ⌘K hint, gradient notification counter, avatar menu button) above a page heading with a frosted segmented tab switcher and a gradient primary action.

GlassApp header

Header Document

Sticky glass editor header: breadcrumbs, inline-editable document title, saved/editing indicator, live viewers with green presence rings, gradient Share button and more menu.

GlassApp header

Header Greeting

Dashboard header with a time-of-day greeting and day summary, notification bell with gradient counter, a large glass “Ask Halo” search bar with gradient submit and quick-action chips.

GlassApp header

Header Meeting

In-call glass header pill: pulsing REC timer, meeting title, “Halo is taking notes” gradient chip, participant avatars, grid/speaker layout toggle, translate toggle and a red Leave button.

GlassApp header

App Header

Two-row app header: breadcrumbs, ⌘K search trigger and notification dot on top; view tabs with Filter / Display actions below. Includes a working command palette (Radix Dialog) with grouped, filterable, keyboard-navigable commands.

MinimalApp header

Header Detail

Detail-page header: breadcrumbs ending on a copyable mono id, title with status pill, a key/value meta row, action buttons and underline section tabs with counts.

MinimalApp header

Header Switcher

Vercel-style global top bar: logo then organization / project / environment switchers separated by slashes (production badge in red), with dropdown lists, help, notification dot and avatar.

MinimalApp header

Header Toolbar

List-page toolbar: title with count and New button, then a search field, removable key/value filter chips, an Add filter button and a list/board view toggle.

MinimalApp header

App Header

Path-style app header: slash-separated breadcrumb “Nord Studio / Projects / Oslo Opera” (last segment ink), live status with signal dot and last-edit time in mono, outline “Preview” and ink “Publish”.

Mono CleanApp header

Header Editor

Editor top bar in three zones: back arrow + editable page title, a centered square device switcher (desktop/tablet/mobile, radio semantics), and undo/redo text actions + save state + ink Publish.

Mono CleanApp header

Header Tabs

Settings-style header: title + domain subtitle, then a row of text tabs with an ink underline on the active one sitting on the hairline; scrolls horizontally on mobile.

Mono CleanApp header

Header Title

Big-title page header: a huge display title with a superscript mono count, then a ruled toolbar with text filters (slash separated, active underlined in signal) on the left and view options + ink action on the right.

Mono CleanApp header

App Header

Friendly app header: time-of-day serif greeting with the user’s name in italic sage, a calm subtitle, a rounded search field, bell with soft dot and an initials avatar.

Organic SoftApp header

Header Period

Report header: serif title with an italic period word that updates, a pill period switcher (radio semantics) and a soft export button; a wavy divider underneath.

Organic SoftApp header

Header Progress

Page header with a target ring: soft breadcrumb, serif title and description, and on the right a circular progress ring (sage stroke on sand) with the percentage and target label.

Organic SoftApp header

Header Tabs

Section header with pill tabs: serif title and a sage action on one row, then a sand track of pill links (active one cream with shadow, counts in small circles) that scrolls on mobile.

Organic SoftApp header

App Header

Friendly top header: “Good morning, Ana 👋” with a day summary; search pill, bell with red badge, periwinkle “New” button and emoji avatar on the right.

Soft FlatApp header

Header Board

Board page header: emoji tile, title and description, member emoji avatars, ink Share pill, then a pill view switcher (Board, List, Week) and a filter button.

Soft FlatApp header

Header Search

Search-first header: wide rounded search field with clear button, and emoji filter chips (Assigned to me, Due soon, Overdue, Done) that toggle to ink below.

Soft FlatApp header

Header Week

Week-planner header: round prev/next arrows around the week range (announced), a lavender “Today” pill and a mint progress pill with emoji and mini bar.

Soft FlatApp header