# Hero Section

> 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.

- Type: React block (Marketing Sections)
- Access: Pro (the source needs a Wingo UI Pro plan, see https://wingo-ui.com/pricing)
- Version: 1.0.2
- Install: `npx wingo-ui@latest add hero-section`
- Docs: https://wingo-ui.com/components/hero-section

## Interaction

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.

## Installation

```bash
npx wingo-ui@latest add hero-section
```

Pro item: run `npx wingo-ui@latest login` once with a Pro account. The CLI adds the files, their dependencies and a version record for updates.

With shadcn: `npx shadcn@latest add @wingo-ui/hero-section` (needs the @wingo-ui registry with your API key in components.json)

Files:

- `components/blocks/hero-section.tsx`

npm dependencies: `npm i motion lucide-react`

Wingo UI dependencies (installed automatically):

- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Avatar](https://wingo-ui.com/components/avatar) ([Markdown](https://wingo-ui.com/components/avatar.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.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)/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

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `announcement?` | `ReactNode` | `"AI summaries for every doc"` | The link pill above the title, after a New badge; an empty string hides it. |
| `announcementHref?` | `string` | `"/changelog"` | Where the pill links to. |
| `title?` | `ReactNode` | `"Plan, write and ship in one calm workspace"` | The page title, on the shared marketing scale. |
| `description?` | `ReactNode` | `"Acme brings your roadmap, docs and automations together, so small teams spend less time syncing and more time shipping."` | The paragraph under the title. |
| `actions?` | `ReactNode` |  | Replaces the primary and secondary buttons; they stack full width on phones. |
| `media?` | `ReactNode` | `"<ProductMockup />"` | The picture next to or under the copy (the drawn scene in media, the terminal in terminal, none by default in editorial); null hides it. |
| `showMedia?` | `boolean` | `true` | Shows the media. |
| `socialProof?` | `boolean` | `true` | The avatars, five stars and the Loved by line under the actions; in editorial, the rule and the key facts. |
| `facts?` | `HeroSectionFact[]` | `"HERO_SECTION_FACTS"` | The key facts ({ value, label }) under the rule in the editorial layout, up to four. |
| `avatars?` | `string[]` | `"HERO_SECTION_AVATARS"` | Names for the social proof avatars, drawn as initials. |
| `layout?` | `"centered" \| "split" \| "stacked" \| "editorial" \| "media" \| "terminal"` | `"centered"` | 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. |
| `background?` | `"glow" \| "grid" \| "mesh" \| "none"` | `"glow"` | 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. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The glow, the New badge and the mockup's accent. |
| `ctaTone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The primary button; brand is the marketing orange. |
| `headingAs?` | `"h1" \| "h2"` | `"h1"` | The title element: h1 when the hero opens the page. |
| `headingSize?` | `"md" \| "lg"` | `"lg"` | The title scale: lg for a page's first heading, md for a quieter header. |
| `width?` | `"lg" \| "xl"` | `"lg"` | The content width: lg 1200px, xl 1400px. |
| `spacing?` | `"none" \| "sm" \| "md" \| "lg"` | `"md"` | Vertical padding, as in MarketingSection: sm 40 / 56px, md 56 / 96px, lg 80 / 128px. |
| `animateIn?` | `boolean` | `true` | Rises in once when mounted on the client; server markup is always final. |
| `linkComponent?` | `(props: LinkComponentProps) => ReactNode` | `"\"a\""` | The router link (next/link in an app); default the LinkProvider's. |
| `labels?` | `Partial<HeroSectionLabels>` |  | announcementBadge, primary, secondary, proof, rating, ratingLabel, people, scene and terminal (spoken descriptions of the drawn media), terminalTitle. |
| `hrefs?` | `Partial<HeroSectionHrefs>` |  | primary (/sign-up) and secondary (/contact). |
| `className?` | `string` |  | Classes for the <section>. |
| `classNames?` | `Partial<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 (component)

The 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.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `url?` | `string` | `"app.acme.com/roadmap"` | The address in the bar. |
| `tone?` | `"neutral" \| "brand" \| "success" \| "warning" \| "danger" \| "info"` | `"neutral"` | The accent of the counts, progress bars and chart. |
| `label?` | `string` |  | The spoken description of the picture. |

### BrowserFrame (component)

A window chrome (three dots and an address bar) around any children: screenshots, videos, drawn UI. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `url?` | `string` | `"app.acme.com"` | The address in the bar. |
| `classNames?` | `Partial<Record<"bar" \| "url" \| "body", string>>` |  | Classes for the inner parts. |

### HERO_SECTION_FACTS (constant)

The sample key facts for the editorial layout.

### HeroSectionFact (type)

One key fact: value and label.

### HERO_SECTION_AVATARS (constant)

The sample names for the social proof avatars.

### DEFAULT_HERO_SECTION_LABELS (constant)

The English strings.

### DEFAULT_HERO_SECTION_HREFS (constant)

The default action links.

### HeroSectionProps (type)

Props 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.

## See also

- [Marketing Section](https://wingo-ui.com/components/marketing-section) ([Markdown](https://wingo-ui.com/components/marketing-section.md))
- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Hero Header](https://wingo-ui.com/components/hero-header) ([Markdown](https://wingo-ui.com/components/hero-header.md))
- [Landing Page](https://wingo-ui.com/templates/landing-page) ([Markdown](https://wingo-ui.com/templates/landing-page.md))
- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Avatar](https://wingo-ui.com/components/avatar) ([Markdown](https://wingo-ui.com/components/avatar.md))

---

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