# Marketing Header

> A React marketing header for a SaaS site: a sticky navbar with logo, dropdown panels, Sign in, Get started, a news strip and a phone menu.

- Type: React block (Marketing Sections)
- Access: Free (the source is open to everyone)
- Version: 1.0.0
- Install: `npx wingo-ui@latest add marketing-header`
- Docs: https://wingo-ui.com/components/marketing-header

## Interaction

The bar sticks to the top and blurs the page under it. Hover or focus Product, Solutions or Resources and one shared panel morphs between their link lists (with a featured card); Escape closes it and arrow keys move between the links. The link for the current page is marked. Tab starts with a Skip to content link. The announcement strip above the bar is one link. Below 1024px the links fold into a menu button that opens a bottom sheet with every link, the panels as groups, and Sign in and Get started as full-width buttons; drag it down, tap outside or press Escape to close.

## Installation

```bash
npx wingo-ui@latest add marketing-header
```

The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add https://wingo-ui.com/r/marketing-header.json`

Files:

- `components/blocks/marketing-header.tsx`

npm dependencies: `npm i lucide-react`

Wingo UI dependencies (installed automatically):

- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Nav Menu](https://wingo-ui.com/components/nav-menu) ([Markdown](https://wingo-ui.com/components/nav-menu.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))
- [Tones](https://wingo-ui.com/components/tones) ([Markdown](https://wingo-ui.com/components/tones.md))
- [UIProvider](https://wingo-ui.com/components/ui-config) ([Markdown](https://wingo-ui.com/components/ui-config.md))

## Usage

```tsx
// app/(marketing)/layout.tsx
"use client"

import Link from "next/link"
import { usePathname } from "next/navigation"
import { MarketingHeader } from "@/components/blocks/marketing-header"
import { MarketingFooter } from "@/components/blocks/marketing-footer"

export default function MarketingLayout({ children }: { children: React.ReactNode }) {
  return (
    <>
      <MarketingHeader
        linkComponent={Link}
        currentPath={usePathname()}
        announcement="Acme 3.0 is here: timelines and AI summaries"
        announcementHref="/changelog"
      />
      <main id="main">{children}</main>
      <MarketingFooter linkComponent={Link} />
    </>
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items?` | `NavMenuItem[]` | `"MARKETING_NAV"` | The links; an item with items opens a dropdown panel (icons, descriptions, columns, a featured card). |
| `logo?` | `ReactNode` | `"<MarketingLogo />"` | Replaces the sample brand; it links to hrefs.home. |
| `actions?` | `ReactNode` |  | Replaces Sign in and Get started (in the bar and in the phone menu). |
| `mobileActions?` | `ReactNode` |  | Replaces actions in the phone menu, where they stack full width. |
| `announcement?` | `ReactNode` | `""` | A strip above the bar for launch news; a link when announcementHref is set. |
| `announcementHref?` | `string` | `"/changelog"` | Where the announcement links to; empty for plain text. |
| `currentPath?` | `string` | `""` | The current pathname, so its link is marked; default the LinkProvider's. |
| `layout?` | `"default" \| "centered" \| "pill"` | `"default"` | default is a full-width bar; centered puts the links on the left, the logo in the middle and the actions on the right; pill floats a rounded bar inset from the edges. Phones keep the bar with the menu sheet in every layout. |
| `variant?` | `"glass" \| "solid" \| "transparent"` | `"glass"` | glass blurs the page under the sticky bar, solid is opaque, transparent sits on a hero (the pill layout keeps a light blur so its links stay readable). |
| `sticky?` | `boolean` | `true` | Sticks to the top while the page scrolls. |
| `bordered?` | `boolean` | `true` | A hairline under the bar. |
| `width?` | `"lg" \| "xl"` | `"lg"` | The content width: lg 1200px (like MarketingSection), xl 1400px. |
| `indicator?` | `"pill" \| "underline" \| "none"` | `"pill"` | The highlight that slides between the links. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The Get started button; brand is the marketing orange. |
| `skipTo?` | `string` | `"main"` | The id the Skip to content link jumps to; an empty string removes the link. |
| `modal?` | `boolean` | `true` | The phone menu traps focus and locks the page; false for inline previews. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"\"a\""` | The router link for every link (next/link in an app); default the LinkProvider's. |
| `labels?` | `Partial<MarketingHeaderLabels>` |  | brand, home, signIn, getStarted, skipLink and the menu's aria labels. |
| `hrefs?` | `Partial<MarketingHeaderHrefs>` |  | home, signIn and signUp. |
| `className?` | `string` |  | Classes for the <header>. |
| `classNames?` | `Partial<Record<MarketingHeaderSlot, string>>` |  | Classes for announcement, bar, container, logo and actions. |

## Parts

### MarketingLogo (component)

The sample brand: a mark on the neutral fill and the name. Takes span props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `name?` | `ReactNode` | `"Acme"` | The wordmark. |
| `mark?` | `ReactNode` |  | Replaces the mountain glyph. |

### MarketingHeaderLayout (type)

"default" | "centered" | "pill".

### MARKETING_NAV (constant)

The sample navigation: Product and Resources panels, Solutions, Pricing, Customers, Contact.

### DEFAULT_MARKETING_HEADER_LABELS (constant)

The English strings.

### MarketingHeaderProps (type)

Props of MarketingHeader.

## Examples

- **Launch announcement, brand action**: The strip links to the changelog; Get started takes the marketing orange.
- **Your own brand and links**: A custom logo, three plain links and one action.
- **Solid, wide**: An opaque bar at 1400px, for content-heavy sites.
- **Centered logo**: Links on the left, the logo in the middle and the actions on the right; phones keep the menu sheet.
- **Floating pill**: A rounded glass bar inset from the edges, under the launch announcement.

## See also

- [Nav Menu](https://wingo-ui.com/components/nav-menu) ([Markdown](https://wingo-ui.com/components/nav-menu.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.md))
- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Navigation](https://wingo-ui.com/components/navigation) ([Markdown](https://wingo-ui.com/components/navigation.md))

---

Canonical: https://wingo-ui.com/components/marketing-header
More components: https://wingo-ui.com/components · Index for agents: https://wingo-ui.com/llms.txt
