Hero Section React block for Tailwind CSS v4
v1.0.2Updated in 1.9.0
A React hero section for a landing or product page: an announcement pill, a big title, two actions, social proof and a product shot drawn in code.
A static page header that rises in once when it mounts on the client (never during hydration, under reduced motion or with animateIn off). The announcement pill and both actions are links through your router. The default media is a browser frame with a mini Acme board drawn with tokens, so it follows the theme; it folds its sidebar, columns and chart with its own width, so it fits a split column and a 360px phone without scrolling sideways. On phones the actions stack full width and the split layout puts the media under the copy.
Hero Section is a Pro 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 hero-section, together with Marketing Section, Avatar, Button, Motion presets, Navigation and 2 more and the npm packages motion and lucide-react.
Built with
The sections this page is made of. In the full-screen preview, hold Alt to outline each one on the page.
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 hero-sectionHero Section is part of Pro, with 298 more Pro items: $8 a month or $150 once. 14-day refund before you download any Pro item. See plans
Usage
Import HeroSection from @/components/blocks/hero-section.
// app/(marketing)/page.tsx
import Link from "next/link"
import { HeroSection } from "@/components/blocks/hero-section"
export default function HomePage() {
return (
<HeroSection
linkComponent={Link}
layout="split"
ctaTone="brand"
announcement="Timelines are live"
announcementHref="/changelog"
hrefs={{ primary: "/sign-up", secondary: "/contact" }}
/>
)
}Props
announcementdefault"AI summaries for every doc"ReactNodeThe link pill above the title, after a New badge; an empty string hides it.
announcementHrefdefault"/changelog"stringWhere the pill links to.
titledefault"Plan, write and ship in one calm workspace"ReactNodeThe page title, on the shared marketing scale.
descriptiondefault"Acme brings your roadmap, docs and automations together, so small teams spend less time syncing and more time shipping."ReactNodeThe paragraph under the title.
actionsReactNodeReplaces the primary and secondary buttons; they stack full width on phones.
mediadefault"<ProductMockup />"ReactNodeThe picture next to or under the copy (the drawn scene in media, the terminal in terminal, none by default in editorial); null hides it.
showMediadefaulttruebooleanShows the media.
socialProofdefaulttruebooleanThe avatars, five stars and the Loved by line under the actions; in editorial, the rule and the key facts.
factsdefault"HERO_SECTION_FACTS"HeroSectionFact[]The key facts ({ value, label }) under the rule in the editorial layout, up to four.
avatarsdefault"HERO_SECTION_AVATARS"string[]Names for the social proof avatars, drawn as initials.
layoutdefault"centered""centered" | "split" | "stacked" | "editorial" | "media" | "terminal"centered: copy over a wide shot; split: copy left, media right; stacked: title and copy side by side over a wide shot; editorial: a magazine cover with huge start-aligned type, a narrow description column, plain buttons and key facts under a rule, no mockup; media: a full-width drawn workspace with the copy in a glass card at the bottom-start (under the scene on phones); terminal: copy beside a drawn terminal with a CLI install and an API call.
backgrounddefault"glow""glow" | "grid" | "mesh" | "none"A soft radial light in the tone, faint grid lines that fade out, a soft multi-stop gradient mesh, or nothing. Unset, it is glow on its own (or under a plain PageBackdrop) and none inside a decorated PageBackdrop, so the hero never stacks its glow on the page's; an explicit value always wins.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The glow, the New badge and the mockup's accent.
ctaTonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The primary button; brand is the marketing orange.
headingAsdefault"h1""h1" | "h2"The title element: h1 when the hero opens the page.
headingSizedefault"lg""md" | "lg"The title scale: lg for a page's first heading, md for a quieter header.
widthdefault"lg""lg" | "xl"The content width: lg 1200px, xl 1400px.
spacingdefault"md""none" | "sm" | "md" | "lg"Vertical padding, as in MarketingSection: sm 40 / 56px, md 56 / 96px, lg 80 / 128px.
animateIndefaulttruebooleanRises in once when mounted on the client; server markup is always final.
linkComponentdefault""a""(props: LinkComponentProps) => ReactNodeThe router link (next/link in an app); default the LinkProvider's.
labelsPartial<HeroSectionLabels>announcementBadge, primary, secondary, proof, rating, ratingLabel, people, scene and terminal (spoken descriptions of the drawn media), terminalTitle.
hrefsPartial<HeroSectionHrefs>primary (/sign-up) and secondary (/contact).
classNamestringClasses for the <section>.
classNamesPartial<Record<HeroSectionSlot, string>>Classes for container, background, announcement, heading, title, description, actions, proof, media, card (the glass card in media) and facts (editorial).
Parts
ProductMockup
componentThe default media: a browser frame holding a mini Acme board (sidebar, task columns, a weekly chart), drawn with tokens. It folds with its own width. Takes div props.
urldefault"app.acme.com/roadmap"stringThe address in the bar.
tonedefault"neutral""neutral" | "brand" | "success" | "warning" | "danger" | "info"The accent of the counts, progress bars and chart.
labelstringThe spoken description of the picture.
BrowserFrame
componentA window chrome (three dots and an address bar) around any children: screenshots, videos, drawn UI. Takes div props.
urldefault"app.acme.com"stringThe address in the bar.
classNamesPartial<Record<"bar" | "url" | "body", string>>Classes for the inner parts.
HERO_SECTION_FACTS
constantThe sample key facts for the editorial layout.
HeroSectionFact
typeOne key fact: value and label.
HERO_SECTION_AVATARS
constantThe sample names for the social proof avatars.
DEFAULT_HERO_SECTION_LABELS
constantThe English strings.
DEFAULT_HERO_SECTION_HREFS
constantThe default action links.
HeroSectionProps
typeProps of HeroSection.
Examples
Split, brand action
Copy on the left, the product on the right, the one orange button.
Stacked on a grid
Title and copy side by side over a wide product shot, on faint grid lines.
Your own media and actions
Any picture in a BrowserFrame, a video button, no social proof.
Copy only
No media and no background: a quiet page header for an inner page.
Editorial cover
Magazine-size type aligned to the start, a narrow description column and three key facts under a rule.
Copy over a drawn workspace
A full-width scene of the app with the copy in a glass card; on phones the card sits under it.
Terminal for developers
Copy beside a terminal that installs the CLI and calls the API, for a developer product page.
Mesh background
A soft multi-stop gradient behind the centered hero, tinted by the info tone.
Files
- components/blocks/hero-section.tsx
FAQ
Is the React Hero Section block free?
The preview, props and docs are free; copying the source needs a Pro plan. See plans.
How do I install Hero Section?
Run npx wingo-ui@latest add hero-section. It also adds the Wingo UI items it builds on (Marketing Section, Avatar, Button, Motion presets, Navigation and 2 more) and the npm packages motion and lucide-react. With shadcn, add the @wingo-ui registry with your API key, then run npx shadcn@latest add @wingo-ui/hero-section.
How does Hero Section behave on phones?
On phones the actions stack full width and the split layout puts the media under the copy.
See also
Used in
More React marketing sections
Articles using this component
- AI SaaS Landing Page Template: The 4 Sections It Needs
Build it: screens and apps9 min read
- Mobile App Landing Page Template: QR Code and Store Links
Build it: screens and apps9 min read
- Shadcn Hero Section: Six Layouts That Work at 390px
Build it: screens and apps8 min read
- Claude Code Landing Page That Does Not Look AI-Made
Building UI with AI agents11 min read
New components by email
New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.