Adminheader
ImplementedSticky admin top bar with brand, nav, and breadcrumbs slots plus a bilingual Cmd+K command-palette search trigger.
components/organisms/AdminHeader/AdminHeader.tsxSticky admin top bar with brand, nav and breadcrumbs slots plus a bilingual Cmd+K command-palette search trigger (role="banner").
AdminHeader
Organism — Admin family
Sticky role=banner header with three ReactNode slots (brand, nav, breadcrumbs) and a Cmd+K trigger whose accessible label is locale-keyed ('Open command palette' / 'Ouvrir la palette de commandes'). onSearch opens the command palette; breadcrumbs render on a second row when present.
Command palette closed.
This component supports light and dark mode.
Usage
Brand, nav and breadcrumbs are ReactNode slots — compose AdminNav, breadcrumbs or custom nodes; the header owns only the sticky chrome and layout. locale keys the built-in search-trigger label only (slot content is localized at the call site), and onSearch opens your palette — nothing opens by default.
import { AdminHeader, AdminNav } from '@epasslive/design-system'
<AdminHeader
locale={locale}
brand={<span className="font-semibold text-ep-text-heading">ePassLive</span>}
nav={<AdminNav items={sections} activeId="overview" />}
breadcrumbs={<ProfileBreadcrumbs profile={profile} />}
onSearch={() => openCommandPalette()}
/>Conventions
Keep brand short (wordmark or name) and give breadcrumbs a real trail (grandparent → parent → current). The ⌘K glyph is decorative (aria-hidden) — the locale-keyed aria-label carries the meaning, and the keydown binding happens at the app level, not here.
Accessibility
The bar is a role="banner" landmark (WCAG 1.3.1). The search trigger exposes a locale-keyed aria-label (WCAG 4.1.2) — the visible ⌘K glyph is aria-hidden. Slot content keeps its own semantics; nothing interactive is flattened.
Props
brand*React.ReactNodeBrand slot — logo or wordmark rendered at the left.
navReact.ReactNodeNav slot between brand and search trigger (e.g. <AdminNav />).
breadcrumbsReact.ReactNodeBreadcrumb row — rendered on its own line below the main bar when present.
onSearch() => voidOpens the command palette (Cmd+K trigger click).
locale*"en" | "fr"Keys the search trigger's accessible label (bilingual chrome string).
Additional interface props
classNamestringClass on the header element (e.g. surface tint).
idstringStable id for the banner.
Props
Adminheader
brandReact.ReactNode—Brand slot — logo or wordmark rendered at the left.
navReact.ReactNode—Optional nav slot; render a `<nav>`-landmark child (e.g. AdminNav). The slot itself is not a landmark.
breadcrumbsReact.ReactNode—Breadcrumb row — rendered on its own line below the main bar when present.
onSearch() => void—Opens the command palette (⌘K trigger click). When omitted, the trigger does not render.
locale"en" | "fr"—Keys the search trigger's accessible label (bilingual chrome string).
searchLabelstring—Overrides the search trigger's accessible label (defaults to the locale-keyed chrome string).
classNamestring—Extra classes on the root.
idstring—Stable id on the root <header> banner element.
<Adminheader />