# Site Header

> The everyday marketing header: logo, links and dropdowns on Base UI's Navigation Menu, a sign-in link and a call to action. Transparent at the top, frosted with a hairline once you scroll. Dropdowns hold icon links in one or two columns, a feature card and a footer link in one panel that glides and resizes between them. Phones get a full-screen menu with accordion sections.

- Slug: `site-header`
- Category: [Navigation](https://www.assembli.design/category/navigation.md)
- Type: block
- Tags: header, navbar, navigation-menu, dropdown, mobile-menu, sticky, marketing
- npm dependencies: @base-ui/react, lucide-react
- shadcn/ui dependencies: none
- Live preview: https://www.assembli.design/preview/site-header
- Page: https://www.assembli.design/components/site-header

![Site Header preview](https://www.assembli.design/thumbnails/site-header-light.png)

## Props

Other props pass through to the root element.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `logo` (required) | `React.ReactNode` |  |  |
| `homeHref` | `string` | `"/"` | Where the logo links. |
| `items` (required) | `SiteNavItem[]` |  |  |
| `current` | `string` |  | The current page's href. Its link, or the dropdown holding it, is marked current. |
| `secondaryAction` | `{ label: string; href: string }` |  |  |
| `primaryAction` | `{ label: string; href: string }` |  |  |
| `banner` | `React.ReactNode` |  | A slim bar above the header, such as an announcement. It scrolls away; the header sticks. |
| `sticky` | `boolean` | `true` | Stick to the top of the page. |
| `maxWidth` | `string` | `"72rem"` | Width of the inner row. |

## Install

One-time setup (needs a subscription):

1. Add the registry to the project's `components.json`: `{"@assembli":{"url":"https://www.assembli.design/r/{name}.json","headers":{"Authorization":"Bearer ${ASSEMBLI_API_KEY}"}}}` (merge into `"registries"`).
2. Put an API key from https://www.assembli.design/account in `.env.local` as `ASSEMBLI_API_KEY=asm_…`.

Then install with the shadcn CLI (writes `components/site-header/site-header.tsx` and installs dependencies):

```bash
npx shadcn@latest add @assembli/site-header
```

Registry item JSON: https://www.assembli.design/r/site-header.json (send `Authorization: Bearer <api key>`)

## Code

> Component source needs an Assembli subscription ($12/month or $96/year) and an API key sent as `Authorization: Bearer <key>`. To get one without copying anything, POST https://www.assembli.design/api/agent/login (or call the MCP tool connect_account), show the user the link it returns, and poll https://www.assembli.design/api/agent/token for the key. Or subscribe at https://www.assembli.design/pricing and create a key at https://www.assembli.design/account.
