Skip to content

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.

minimal/layout/header-detail
Open ↗

Source

"use client";

import { useState, type ReactNode } from "react";
import { Check, ChevronRight, Copy, MoreHorizontal } from "lucide-react";
import { cn } from "@/lib/utils";

export interface HeaderDetailProps {
  breadcrumbs?: { label: string; href: string }[];
  id?: string;
  title?: string;
  status?: { label: string; tone: "danger" | "warning" | "success" | "neutral" };
  meta?: { label: string; value: string }[];
  tabs?: { label: string; href: string; count?: number }[];
  activeTab?: string;
  actions?: ReactNode;
  className?: string;
}

const TONE = {
  danger: "bg-da-danger/10 text-da-danger",
  warning: "bg-da-warning/15 text-da-fg",
  success: "bg-da-success/10 text-da-success",
  neutral: "bg-da-muted text-da-muted-fg",
} as const;

/** Detail-page header: breadcrumbs, copyable id, title with status pill, key/value meta row, actions and underline tabs. */
export function HeaderDetail({
  breadcrumbs = [
    { label: "Incidents", href: "#incidents" },
    { label: "Active", href: "#active" },
  ],
  id = "INC-2481",
  title = "Elevated 5xx on checkout-api",
  status = { label: "Identified", tone: "warning" },
  meta = [
    { label: "Severity", value: "SEV1" },
    { label: "Commander", value: "Maya Chen" },
    { label: "Started", value: "14:02 UTC · 18m ago" },
    { label: "Services", value: "checkout-api, payments-db" },
  ],
  tabs = [
    { label: "Overview", href: "#overview" },
    { label: "Timeline", href: "#timeline", count: 24 },
    { label: "Responders", href: "#responders", count: 4 },
    { label: "Postmortem", href: "#postmortem" },
  ],
  activeTab = "#timeline",
  actions,
  className,
}: HeaderDetailProps) {
  const [copied, setCopied] = useState(false);
  const btn = "da-focus da-transition inline-flex h-8 items-center justify-center rounded-da-md px-3 text-[13px] font-medium";

  return (
    <header className={cn("border-b border-da-border bg-da-bg text-da-fg", className)}>
      <div className="px-4 pt-4 sm:px-6">
        <nav aria-label="Breadcrumb">
          <ol className="flex flex-wrap items-center gap-1 text-[13px] text-da-muted-fg">
            {breadcrumbs.map((b) => (
              <li key={b.href} className="flex items-center gap-1">
                <a href={b.href} className="da-focus rounded-da-sm hover:text-da-fg">
                  {b.label}
                </a>
                <ChevronRight aria-hidden className="size-3.5" />
              </li>
            ))}
            <li aria-current="page" className="flex items-center gap-1 font-da-mono text-[12px] text-da-fg">
              {id}
              <button
                type="button"
                onClick={async () => {
                  try {
                    await navigator.clipboard.writeText(id);
                    setCopied(true);
                    window.setTimeout(() => setCopied(false), 1400);
                  } catch {
                    /* clipboard unavailable */
                  }
                }}
                aria-label={copied ? "Copied" : `Copy ${id}`}
                className="da-focus grid size-6 place-items-center rounded-da-sm text-da-muted-fg hover:bg-da-muted hover:text-da-fg"
              >
                {copied ? <Check aria-hidden className="size-3.5 text-da-success" /> : <Copy aria-hidden className="size-3.5" />}
              </button>
            </li>
          </ol>
        </nav>
        <div className="mt-3 flex flex-col gap-4 md:flex-row md:items-start md:justify-between">
          <div className="min-w-0">
            <div className="flex flex-wrap items-center gap-3">
              <h1 className="text-xl font-semibold tracking-da-display">{title}</h1>
              <span className={cn("inline-flex items-center gap-1.5 rounded-da-pill px-2 py-0.5 text-[12px] font-medium", TONE[status.tone])}>
                <span aria-hidden className="size-1.5 rounded-full bg-current" />
                {status.label}
              </span>
            </div>
            <dl className="mt-3 flex flex-wrap gap-x-6 gap-y-2 text-[13px]">
              {meta.map((m) => (
                <div key={m.label} className="flex gap-1.5">
                  <dt className="text-da-muted-fg">{m.label}</dt>
                  <dd className="font-medium">{m.value}</dd>
                </div>
              ))}
            </dl>
          </div>
          <div className="flex shrink-0 items-center gap-2">
            {actions ?? (
              <>
                <button type="button" className={cn(btn, "da-stroke bg-da-surface hover:bg-da-muted")}>
                  Update status
                </button>
                <button type="button" className={cn(btn, "bg-da-success text-da-success-fg hover:bg-da-success/90")}>
                  Resolve
                </button>
                <button type="button" aria-label="More actions" className={cn(btn, "w-8 px-0 text-da-muted-fg hover:bg-da-muted")}>
                  <MoreHorizontal aria-hidden className="size-4" />
                </button>
              </>
            )}
          </div>
        </div>
      </div>
      <nav aria-label="Sections" className="mt-4 overflow-x-auto px-4 sm:px-6">
        <ul className="flex gap-5">
          {tabs.map((t) => {
            const active = t.href === activeTab;
            return (
              <li key={t.href}>
                <a
                  href={t.href}
                  aria-current={active ? "page" : undefined}
                  className={cn(
                    "da-focus da-transition -mb-px flex items-center gap-1.5 border-b-2 pb-2.5 text-[13px] whitespace-nowrap",
                    active ? "border-da-fg font-medium text-da-fg" : "border-transparent text-da-muted-fg hover:text-da-fg",
                  )}
                >
                  {t.label}
                  {t.count !== undefined && <span className="rounded-da-pill bg-da-muted px-1.5 font-da-mono text-[10px] text-da-muted-fg">{t.count}</span>}
                </a>
              </li>
            );
          })}
        </ul>
      </nav>
    </header>
  );
}

export default HeaderDetail;

modules/minimal/layout/header-detail/index.tsx

Props

PropTypeDefaultDescription
breadcrumbs{ label, href }[]—Parent pages.
id / titlestring—Record id and title.
status{ label, tone }—tone: danger | warning | success | neutral.
meta{ label, value }[]—Key facts.
tabs / activeTab{ label, href, count? }[] / string—Section tabs.
actionsReactNode—Replace default actions.
classNamestring—Classes.

Other app header variants in Minimal

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

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