Site header
BlockA whole site header from one list: menus with a featured card on desktop, the same links grouped in the mobile menu.
- Headers
- 3 components
- 1 file
Loading the example…
pnpm dlx @dowel-ui/cli add site-headerimport { SiteHeaderBlock } from "@/components/blocks/site-header"; export default function Page() { return <SiteHeaderBlock />;}<SiteHeaderBlock>
| Prop | Type | Default |
|---|---|---|
brandThe brand: a logo and name. | ReactNode | ( <> <span aria-hidden="true" className="size-6 rounded-lg bg-primary" /> Acme </> ) |
brandHref | string | "/" |
ctaThe call to action. | { label: string; href: string } | null | { label: "Get started", href: "#" } |
items | SiteHeaderItem[] | DEFAULT_ITEMS |
signInThe quiet action, e.g. sign in. | { label: string; href: string } | null | { label: "Sign in", href: "#" } |
skipToWhere the skip link goes. | string | null | "#content" |
Built on navbar (skip link, a mobile disclosure with Escape and focus return, never hidden while focused) and navigation-menu (arrow keys along the bar, Escape to close, focus back to the trigger). The desktop and mobile navigations are separate landmarks with their own names, driven by the same list so they always agree. Mobile groups are lists named by their headings.