AppHeader
A Carbon-style UI-shell header: brand, inline nav, actions and a responsive collapsible side-nav drawer. @startingPoint section="Navigation" subtitle="App shell header with nav, actions & responsive side nav" viewport="960x64"
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A Carbon-style UI-shell header: brand, inline nav, actions and a responsive collapsible side-nav drawer.
Accessibility
Arrow keys move between items; the current item is marked aria-current. Tabs follow the WAI-ARIA tabs pattern (roving tabindex, Home/End).
Install and import
npx shadcn@latest add @prism/app-header
import { AppHeader } from '@/components/prism/AppHeader';
In a no-build prototype, read it from the bundle instead: const { AppHeader } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
brand | React.ReactNode | Yes | Brand lockup node (logo + wordmark). |
brandHref | string | — | |
nav | AppHeaderNavItem[] | — | Inline primary nav; collapses into the side nav below collapseAt. |
actions | (AppHeaderAction | React.ReactElement)[] | — | Action buttons at the end (icons), or custom nodes. |
sideNavExtra | AppHeaderNavItem[] | — | Extra items shown only in the side-nav drawer. |
hasSideNav | boolean | — | Force the hamburger + drawer on (else shown when sideNavExtra exists or nav collapses). |
collapseAt | number | — | Width (px) of the header below which inline nav collapses. Default 720. |
theme | "inherit" | "light" | "dark" | — | Header appearance. Omit for the default inverse bar (dark on a light app, for contrast). "inherit" uses the page's surfaces and follows the page's theme — light, dark, data-theme="system" (the OS) or an instrument theme. "light" / "dark" pin the header to that scheme regardless of the page. |
drawerGroups | AppHeaderDrawerGroup[] | — | Grouped drawer content with headings; items can be links or buttons (onPress). |
drawerWhen | "always" | "collapsed" | — | "always" (default): hamburger + drawer whenever there's drawer content. "collapsed": only while the header is narrower than collapseAt. |
linkComponent | LinkComponent | — | Overrides LinkProvider's link component for the brand, nav and drawer links. |
drawer | React.ReactNode | — | Custom drawer content (e.g. a full <Sidebar/>) rendered in the hamburger off-canvas panel instead of the built-in flat list. AppHeader still owns the shell, scrim, Escape and open/close. If you supply this, include your primary nav in it — AppHeader won't fold the top nav into custom content. |
className | string | — |