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.
brutalist/layout/app-headerSource
import type { ReactNode } from "react";
import { Bell, ChevronRight, Plus, Search } from "lucide-react";
import { cn } from "@/lib/utils";
export interface AppHeaderCrumb {
label: string;
href?: string;
}
export interface AppHeaderTab {
label: string;
href: string;
count?: number;
}
export interface AppHeaderProps {
breadcrumbs?: AppHeaderCrumb[];
title?: string;
description?: string;
tabs?: AppHeaderTab[];
activeTab?: string;
/** Primary action on the right of the title. */
action?: { label: string; href: string };
notifications?: number;
user?: { name: string };
searchPlaceholder?: string;
/** Extra content on the right of the top bar (before notifications). */
extra?: ReactNode;
className?: string;
}
export function AppHeader({
breadcrumbs = [{ label: "Acme Inc.", href: "#" }, { label: "acme-web", href: "#" }, { label: "Releases" }],
title = "Releases",
description = "142 releases · last published 2 days ago",
tabs = [
{ label: "All", href: "#all", count: 142 },
{ label: "Drafts", href: "#drafts", count: 3 },
{ label: "Scheduled", href: "#scheduled", count: 1 },
{ label: "Archived", href: "#archived" },
],
activeTab = "#all",
action = { label: "New release", href: "#new" },
notifications = 4,
user = { name: "Maya Okafor" },
searchPlaceholder = "Search releases, PRs, people…",
extra,
className,
}: AppHeaderProps) {
const initials = user.name
.split(" ")
.map((p) => p[0])
.join("")
.slice(0, 2);
return (
<header className={cn("da-stroke-b bg-da-bg text-da-fg", className)}>
<div className="da-stroke-b flex h-16 items-center gap-4 bg-da-surface-2 px-4 sm:px-6">
<nav aria-label="Breadcrumb" className="min-w-0 flex-1">
<ol className="flex items-center gap-1.5 text-sm font-bold">
{breadcrumbs.map((c, i) => {
const last = i === breadcrumbs.length - 1;
return (
<li key={`${c.label}-${i}`} className={cn("flex min-w-0 items-center gap-1.5", !last && "hidden sm:flex")}>
{c.href && !last ? (
<a href={c.href} className="da-focus truncate underline-offset-4 hover:underline">
{c.label}
</a>
) : (
<span aria-current={last ? "page" : undefined} className="truncate">
{c.label}
</span>
)}
{!last && <ChevronRight aria-hidden className="size-4 shrink-0" strokeWidth={3} />}
</li>
);
})}
</ol>
</nav>
<form role="search" className="hidden md:block" action="#">
<label className="da-stroke flex h-10 w-72 items-center gap-2 bg-da-input px-3 focus-within:outline-[length:var(--da-ring-width)] focus-within:outline-offset-2 focus-within:outline-da-ring focus-within:outline-solid">
<Search aria-hidden className="size-4 shrink-0" strokeWidth={2.5} />
<span className="sr-only">Search</span>
<input type="search" name="q" placeholder={searchPlaceholder} className="min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-da-muted-fg" />
<kbd className="da-stroke bg-da-muted px-1 font-da-mono text-[10px] font-bold">⌘K</kbd>
</label>
</form>
{extra}
<a
href="#notifications"
className="da-focus da-stroke relative grid size-10 shrink-0 place-items-center bg-da-surface text-da-surface-fg shadow-da-sm"
aria-label={`Notifications (${notifications} unread)`}
>
<Bell aria-hidden className="size-5" strokeWidth={2.25} />
{notifications > 0 && (
<span aria-hidden className="da-stroke absolute -top-2 -right-2 grid min-w-5 place-items-center bg-da-danger px-1 font-da-mono text-[10px] font-bold text-da-danger-fg">
{notifications}
</span>
)}
</a>
<span aria-label={user.name} role="img" className="da-stroke grid size-10 shrink-0 place-items-center rounded-full bg-da-accent font-da-mono text-xs font-bold text-da-accent-fg">
{initials}
</span>
</div>
<div className="flex flex-col gap-4 px-4 pt-6 sm:flex-row sm:items-end sm:justify-between sm:px-6">
<div>
<h1 className="font-da-display text-3xl tracking-da-display uppercase sm:text-4xl">{title}</h1>
{description && <p className="mt-1 font-da-mono text-xs tracking-da-label text-da-muted-fg uppercase">{description}</p>}
</div>
<a
href={action.href}
className="da-focus da-transition da-stroke inline-flex h-11 items-center gap-2 self-start bg-da-primary px-4 font-bold text-da-primary-fg shadow-da-sm hover:translate-x-[3px] hover:translate-y-[3px] hover:shadow-none sm:self-auto"
>
<Plus aria-hidden className="size-5" strokeWidth={3} />
{action.label}
</a>
</div>
<nav aria-label="Sections" className="mt-6 overflow-x-auto px-4 sm:px-6">
<ul className="flex gap-1">
{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 -mb-[var(--da-border-width)] flex items-center gap-2 border-[length:var(--da-border-width)] border-b-0 px-4 py-2.5 text-sm font-bold whitespace-nowrap",
active ? "border-da-border bg-da-surface text-da-surface-fg" : "border-transparent text-da-muted-fg hover:text-da-fg",
)}
>
{t.label}
{t.count !== undefined && <span className="font-da-mono text-[11px]">{t.count}</span>}
</a>
</li>
);
})}
</ul>
</nav>
</header>
);
}
export default AppHeader;
modules/brutalist/layout/app-header/index.tsx
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| breadcrumbs | AppHeaderCrumb[] | — | { label, href? }[]; the last one is the current page. Only the last is shown on mobile. |
| title | string | "Releases" | Page title (h1). |
| description | string | — | Mono meta line under the title. |
| tabs | AppHeaderTab[] | — | { label, href, count? }[] rendered as a sub-navigation. |
| activeTab | string | "#all" | href of the active tab (aria-current=page). |
| action | { label: string; href: string } | — | Primary action button. |
| notifications | number | 4 | Unread count on the bell (0 hides the counter). |
| user | { name: string } | — | Used for the initials avatar. |
| searchPlaceholder | string | — | Placeholder of the search field (hidden below md). |
| extra | ReactNode | — | Extra element in the top bar. |
| className | string | — | Classes on the <header>. |
Other app header variants in Brutalist
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.
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.
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.
App header in other art directions
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.
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.
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.
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.
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.
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.
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.
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.
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”.
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.
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.
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.
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.
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).
Header Report
Report header: title with “last updated” + refresh, a toolbar with period segmented control, entity select, compare toggle and Export; wraps on mobile.
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.
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.
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.
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.
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.
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.
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.
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.
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.