Marketing Header React block for Tailwind CSS v4
v1.0.0Added in 1.6.0
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.
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.
Marketing Header is a free React block in the React marketing sections category, written in TypeScript for React 19 and Tailwind CSS v4. It installs as source with npx wingo-ui@latest add marketing-header, together with Button, Nav Menu, Navigation, Tones and UIProvider and the npm package lucide-react.
Add to a project
Requirements: React 19 and Tailwind CSS v4, in Next.js (App Router or Pages), Vite or React Router. Installation guide · Next.js setup · Vite setup
npx wingo-ui@latest add marketing-headerUsage
Import MarketingHeader from @/components/blocks/marketing-header.
// 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
itemsdefault"MARKETING_NAV"NavMenuItem[]The links; an item with items opens a dropdown panel (icons, descriptions, columns, a featured card).
logodefault"<MarketingLogo />"ReactNodeReplaces the sample brand; it links to hrefs.home.
actionsReactNodeReplaces Sign in and Get started (in the bar and in the phone menu).
mobileActionsReactNodeReplaces actions in the phone menu, where they stack full width.
announcementdefault""ReactNodeA strip above the bar for launch news; a link when announcementHref is set.
announcementHrefdefault"/changelog"stringWhere the announcement links to; empty for plain text.
currentPathdefault""stringThe current pathname, so its link is marked; default the LinkProvider's.
layoutdefault"default""default" | "centered" | "pill"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.
variantdefault"glass""glass" | "solid" | "transparent"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).
stickydefaulttruebooleanSticks to the top while the page scrolls.
bordereddefaulttruebooleanA hairline under the bar.
widthdefault"lg""lg" | "xl"The content width: lg 1200px (like MarketingSection), xl 1400px.
indicatordefault"pill""pill" | "underline" | "none"The highlight that slides between the links.
ctaTonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The Get started button; brand is the marketing orange.
skipTodefault"main"stringThe id the Skip to content link jumps to; an empty string removes the link.
modaldefaulttruebooleanThe phone menu traps focus and locks the page; false for inline previews.
linkComponentdefault""a""(props: LinkComponentProps) => ReactNodeThe router link for every link (next/link in an app); default the LinkProvider's.
labelsPartial<MarketingHeaderLabels>brand, home, signIn, getStarted, skipLink and the menu's aria labels.
hrefsPartial<MarketingHeaderHrefs>home, signIn and signUp.
classNamestringClasses for the <header>.
classNamesPartial<Record<MarketingHeaderSlot, string>>Classes for announcement, bar, container, logo and actions.
Parts
MarketingLogo
componentThe sample brand: a mark on the neutral fill and the name. Takes span props.
namedefault"Acme"ReactNodeThe wordmark.
markReactNodeReplaces the mountain glyph.
MarketingHeaderLayout
type"default" | "centered" | "pill".
MARKETING_NAV
constantThe sample navigation: Product and Resources panels, Solutions, Pricing, Customers, Contact.
DEFAULT_MARKETING_HEADER_LABELS
constantThe English strings.
MarketingHeaderProps
typeProps 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.
Files
- components/blocks/marketing-header.tsx
FAQ
Is the React Marketing Header block free?
Yes. The source is free and needs no account: copy it from the Code tab or install it with the CLI.
How do I install Marketing Header?
Run npx wingo-ui@latest add marketing-header. It also adds the Wingo UI items it builds on (Button, Nav Menu, Navigation, Tones and UIProvider) and the npm package lucide-react. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/marketing-header.json.
How does Marketing Header behave on phones?
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.
See also
Used in
More React marketing sections
Articles using this component
- SaaS Website Template: The 7 Pages Beyond the Home Page
Build it: screens and apps20 min read
- Shadcn Navbar: Mega Menu, Mobile Menu, Sticky Header
Build it: screens and apps9 min read
New components by email
New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.