Skip to content

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.

glass/layout/header-greeting
Open ↗

Source

"use client";

import { useId } from "react";
import { Bell, Search, Upload, Video, Sparkles } from "lucide-react";
import { cn } from "@/lib/utils";

export interface HeaderGreetingProps {
  name?: string;
  summary?: string;
  quickActions?: { label: string; href: string; icon: "record" | "upload" | "ask" }[];
  notifications?: number;
  onSearch?: (q: string) => void;
  className?: string;
}

const GLASS = "da-stroke bg-da-surface backdrop-blur-da backdrop-saturate-150";
const ICONS = { record: Video, upload: Upload, ask: Sparkles };

/** Dashboard header: time-of-day greeting with a day summary, a large glass “Ask Halo” search, quick-action chips and a notification bell. */
export function HeaderGreeting({
  name = "Amara",
  summary = "You have 4 meetings today and 3 recaps waiting for review.",
  quickActions = [
    { label: "Record a video", href: "#record", icon: "record" },
    { label: "Upload a recording", href: "#upload", icon: "upload" },
    { label: "Ask about last week", href: "#ask", icon: "ask" },
  ],
  notifications = 5,
  onSearch,
  className,
}: HeaderGreetingProps) {
  const id = useId();
  const hour = new Date().getHours();
  const greeting = hour < 12 ? "Good morning" : hour < 18 ? "Good afternoon" : "Good evening";

  return (
    <header className={cn("px-4 pt-8 pb-6 text-da-fg sm:px-8", className)}>
      <div className="mx-auto max-w-5xl">
        <div className="flex items-start justify-between gap-4">
          <div>
            <h1 className="font-da-display text-[clamp(1.75rem,4vw,2.5rem)] leading-tight font-semibold tracking-da-display" suppressHydrationWarning>
              {greeting}, {name}
            </h1>
            <p className="mt-1 text-da-muted-fg">{summary}</p>
          </div>
          <a href="#notifications" className={cn("da-focus relative grid size-11 shrink-0 place-items-center rounded-full shadow-da-sm", GLASS)}>
            <Bell aria-hidden className="size-5" />
            <span className="sr-only">Notifications ({notifications} unread)</span>
            {notifications > 0 && (
              <span
                aria-hidden
                className="absolute -top-0.5 -right-0.5 grid size-5 place-items-center rounded-full bg-gradient-to-br from-da-primary to-da-accent text-[10px] font-semibold text-da-primary-fg ring-2 ring-da-bg"
              >
                {notifications}
              </span>
            )}
          </a>
        </div>
        <form
          role="search"
          className={cn(
            "mt-6 flex items-center gap-2 rounded-da-lg p-2 pl-5 shadow-da-md has-focus-visible:ring-(length:--da-ring-width) has-focus-visible:ring-da-ring",
            GLASS,
          )}
          onSubmit={(e) => {
            e.preventDefault();
            onSearch?.(String(new FormData(e.currentTarget).get("q")));
          }}
        >
          <Search aria-hidden className="size-5 shrink-0 text-da-muted-fg" />
          <label htmlFor={id} className="sr-only">
            Ask Halo
          </label>
          <input
            id={id}
            name="q"
            placeholder="Ask Halo anything — “what did we decide about pricing?”"
            className="h-12 min-w-0 flex-1 bg-transparent text-[15px] outline-none placeholder:text-da-muted-fg"
          />
          <button
            type="submit"
            className="da-focus inline-flex h-11 shrink-0 items-center gap-1.5 rounded-da-md bg-gradient-to-r from-da-primary to-da-accent px-4 text-sm font-semibold text-da-primary-fg shadow-da-sm"
          >
            <Sparkles aria-hidden className="size-4" />
            <span className="max-sm:sr-only">Ask</span>
          </button>
        </form>
        <ul className="mt-4 flex flex-wrap gap-2">
          {quickActions.map((a) => {
            const Icon = ICONS[a.icon];
            return (
              <li key={a.href}>
                <a
                  href={a.href}
                  className={cn(
                    "da-focus da-transition inline-flex items-center gap-2 rounded-da-pill px-3.5 py-2 text-sm font-medium shadow-da-sm hover:-translate-y-0.5",
                    GLASS,
                  )}
                >
                  <Icon aria-hidden className="size-4 text-da-primary" />
                  {a.label}
                </a>
              </li>
            );
          })}
        </ul>
      </div>
    </header>
  );
}

export default HeaderGreeting;

modules/glass/layout/header-greeting/index.tsx

Props

PropTypeDefaultDescription
name / summarystring—Greeting.
quickActions{ label, href, icon: record | upload | ask }[]—Chips.
notificationsnumber5Unread.
onSearch(q: string) => void—Search handler.
classNamestring—Classes.

Other app header variants in Glass

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

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

Page header for app screens: breadcrumb trail, title + description, right-aligned secondary/primary actions and an optional row of key-value meta; white with a bottom border.

Neo CorporateApp header

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 CorporateApp header

Header Report

Report header: title with “last updated” + refresh, a toolbar with period segmented control, entity select, compare toggle and Export; wraps on mobile.

Neo CorporateApp header

Header Tabs

Record header (e.g. a customer): avatar initials, name + status pill, subtitle, action buttons, and an underline tab bar (links with aria-current and counts) that scrolls horizontally on mobile.

Neo CorporateApp 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