SiteHeader

The sticky top bar, with a burger menu below the md breakpoint.

The header stays pinned to the top, with a backdrop blur.
<SiteHeader.Root>
	<SiteHeader.Bar>
		<SiteHeader.Brand href="/"><BrandLogo /></SiteHeader.Brand>
		<SiteHeader.Nav>
			<SiteHeader.NavList>
				<SiteHeader.NavItem href="/#pricing">Pricing</SiteHeader.NavItem>
			</SiteHeader.NavList>
			<SiteHeader.Actions>
				<Button size="sm">I'm hiring</Button>
			</SiteHeader.Actions>
		</SiteHeader.Nav>
		<SiteHeader.MobileToggle aria-label="Open or close the menu" />
	</SiteHeader.Bar>
	<SiteHeader.MobileMenu>
		<SiteHeader.MobileNavItem href="/#pricing">Pricing</SiteHeader.MobileNavItem>
	</SiteHeader.MobileMenu>
</SiteHeader.Root>

MobileToggle and MobileMenu share their open state through the root, so the two lists are declared separately but only one is ever visible.

API

SiteHeader.Root

PropTypeDefault
defaultOpenbooleanfalseWhether the mobile menu starts open. Leave it off: the menu server-renders closed and hydrates, so opening by default flashes on first paint.

Plus every <header> prop. Source: landing/components/site-header/root.tsx.

SiteHeader.Actions

Plus every <div> prop. Source: landing/components/site-header/actions.tsx.

PropTypeDefault
aria-labelstringDefines a string value that labels the current element.

Plus every <nav> prop. Source: landing/components/site-header/bar.tsx.

SiteHeader.Brand

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <a> prop. Source: landing/components/site-header/brand.tsx.

SiteHeader.MobileActions

Plus every <li> prop. Source: landing/components/site-header/mobile-actions.tsx.

SiteHeader.MobileMenu

Plus every <div> prop. Source: landing/components/site-header/mobile-menu.tsx.

SiteHeader.MobileNavItem

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <a> prop. Source: landing/components/site-header/mobile-nav-item.tsx.

SiteHeader.MobileToggle

PropTypeDefault
aria-labelstringrequiredDefines a string value that labels the current element.

Plus every <button> prop. Source: landing/components/site-header/mobile-toggle.tsx.

SiteHeader.Nav

Plus every <div> prop. Source: landing/components/site-header/nav.tsx.

SiteHeader.NavItem

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <a> prop. Source: landing/components/site-header/nav-item.tsx.

SiteHeader.NavList

PropTypeDefault
renderComponentRenderFn<HTMLProps, {}> | ReactElement<unknown, string | JSXElementConstructor<any>>Allows you to replace the component's HTML element with a different tag, or compose it with another component. Accepts a ReactElement or a function that returns the element to render.

Plus every <ul> prop. Source: landing/components/site-header/nav-list.tsx.