# Marketing Section

> The React marketing section frame every section sits in: an eyebrow, a title and a description on one shared scale, plus the page backdrop and a newsletter form.

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

## Interaction

A section is static: an eyebrow, a title (h2 by default, h1 for a page's first section), a description and actions, then your content under it. The column widths, paddings and type sizes are the ones every section and template uses, so pages built from parts line up. Wrap a page in PageBackdrop to give it a main background and a band look: sections with background muted then alternate with the page in that look, and the cards inside them are lifted above the band. The newsletter form checks the address when you submit, shows the error under the field, spins while onSubscribe runs and swaps itself for a confirmation; Enter submits.

## Installation

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

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-section.json`

Files:

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

npm dependencies: `npm i motion lucide-react`

Wingo UI dependencies (installed automatically):

- [Button](https://wingo-ui.com/components/button) ([Markdown](https://wingo-ui.com/components/button.md))
- [Input](https://wingo-ui.com/components/input) ([Markdown](https://wingo-ui.com/components/input.md))
- [Motion presets](https://wingo-ui.com/components/motion) ([Markdown](https://wingo-ui.com/components/motion.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
import { Button } from "@/components/ui/button"
import { MarketingSection, NewsletterForm, PageBackdrop } from "@/components/blocks/marketing-section"

export function Page() {
  return (
    <PageBackdrop background="aurora" bandBackground="tinted" className="min-h-dvh text-foreground">
      <MarketingSection title="Everything your team needs" />
      <MarketingSection title="Loved by teams" background="muted" />
    </PageBackdrop>
  )
}

export function Newsletter() {
  return (
    <MarketingSection
      eyebrow="Newsletter"
      title="Product notes, once a month"
      description="What shipped, what is next and one thing we learned."
      width="sm"
      background="muted"
    >
      <NewsletterForm
        note="No spam. Unsubscribe in one click."
        onSubscribe={(email) => fetch("/api/subscribe", { method: "POST", body: JSON.stringify({ email }) })}
      />
    </MarketingSection>
  )
}

export function Intro() {
  return (
    <MarketingSection
      title="Everything your team needs"
      actions={<Button size="lg">Get started</Button>}
    />
  )
}
```

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `eyebrow?` | `ReactNode` | `"Why Acme"` | The small uppercase line over the title. |
| `title?` | `ReactNode` | `"Everything your team needs, nothing it doesn't"` | The section title; it balances over two lines and caps at 22 characters per line. |
| `description?` | `ReactNode` | `"Plan the work, write it down and ship it, in one calm workspace that stays fast at 10 or 10,000 tasks."` | The muted paragraph under the title. |
| `actions?` | `ReactNode` |  | Buttons under the description; they stack full width on phones. |
| `children?` | `ReactNode` |  | The section's content, placed under the heading. |
| `align?` | `"start" \| "center"` | `"center"` | Where the heading sits. |
| `width?` | `"sm" \| "md" \| "lg" \| "xl"` | `"lg"` | The column: sm 720px (reading), md 960px, lg 1200px (the page width), xl 1400px. |
| `spacing?` | `"none" \| "sm" \| "md" \| "lg"` | `"md"` | Vertical padding: sm 40 / 56px, md 56 / 96px, lg 80 / 128px (phone / desktop). |
| `background?` | `"none" \| "muted"` | `"none"` | muted makes the section a band, the secondary background: in the look its PageBackdrop sets (muted gray, tinted, gradient or dots), muted gray without one. A band is opaque and lifts surface and card fills one step above itself, so cards, fields and tiles inside never share its color. |
| `divider?` | `boolean` | `false` | A hairline above the section. |
| `headingSize?` | `"md" \| "lg"` | `"md"` | md for sections (26 / 36px titles), lg for a page's first heading (34 / 56px). |
| `headingAs?` | `"h1" \| "h2" \| "h3"` | `"h2"` | The title element. |
| `id?` | `string` |  | The anchor; the title gets <id>-title and labels the section. |
| `className?` | `string` |  | Classes for the <section>. |
| `classNames?` | `Partial<Record<MarketingSectionSlot, string>>` |  | Classes for container, heading, eyebrow, title, description, actions and content. |

## Parts

### SectionHeading (component)

The heading on its own (eyebrow, title, description, actions), for a hero or a card. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `eyebrow?` | `ReactNode` |  | The small uppercase line. |
| `title?` | `ReactNode` |  | The title. |
| `description?` | `ReactNode` |  | The muted paragraph. |
| `actions?` | `ReactNode` |  | Buttons under it. |
| `align?` | `"start" \| "center"` | `"center"` | Text alignment. |
| `size?` | `"md" \| "lg"` | `"md"` | Section or page scale. |
| `as?` | `"h1" \| "h2" \| "h3"` | `"h2"` | The title element. |
| `titleId?` | `string` |  | id of the title, for aria-labelledby. |
| `classNames?` | `Partial<Record<"eyebrow" \| "title" \| "description" \| "actions", string>>` |  | Classes for the parts. |

### NewsletterForm (component)

An email field and a Subscribe button that validates, spins and confirms. Takes form props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `onSubscribe?` | `(email: string) => (void \| Promise<unknown>)` |  | Called with a valid address; a rejection shows labels.failed. Without it the form waits 900 ms and succeeds. |
| `layout?` | `"inline" \| "stacked"` | `"inline"` | One row from 640px, or always stacked. |
| `size?` | `"md" \| "lg"` | `"md"` | Field and button height. |
| `tone?` | `Tone` | `"neutral"` | The button. |
| `note?` | `ReactNode` |  | A line under the form, the privacy promise. |
| `labels?` | `Partial<NewsletterFormLabels>` |  | email, placeholder, submit, success, invalid, failed. |

### PageBackdrop (component)

The root of a page: the main background (a tinted base plus a decoration over the first screen) and the band look of every background="muted" section inside. Takes div props.

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `background?` | `"plain" \| "soft" \| "glow" \| "aurora" \| "grid" \| "dots"` | `"glow"` | plain is the bare page color; the others tint the page with a few percent of backgroundColor (dark pages become a deep tinted black) and add a glow, an aurora, a grid or dots over the first screen. |
| `backgroundColor?` | `string` | `"oklch(0.62 0.14 275)"` | The tint and glow color of the main background, any CSS color. |
| `bandBackground?` | `"muted" \| "tinted" \| "gradient" \| "dots"` | `"muted"` | The secondary background, used by every background="muted" section inside. |
| `bandColor?` | `string` |  | The tint of tinted and gradient bands; defaults to backgroundColor. |
| `classNames?` | `Partial<Record<"layer", string>>` |  | Classes for the decoration layer. |

### bandClasses (function)

bandClasses(band?) returns the classes of a band (muted by default), for a custom section that is not a MarketingSection: the opaque fill plus the lifted surface and card tokens. Pair with bandStyle(color) for tinted and gradient bands.

### bandStyle (function)

bandStyle(color?) returns the style that sets a band's tint (--band-color), or undefined without a color.

### useBandBackground (hook)

The band look of the nearest PageBackdrop (muted outside one), for custom band sections: cn(bandClasses(useBandBackground()), ...).

### usePageBackground (hook)

The main background of the nearest PageBackdrop, or null outside one. The hero uses it to skip its own glow on a decorated page.

### DEFAULT_BACKDROP_COLOR (constant)

The default tint of the page and the bands: oklch(0.62 0.14 275), a calm periwinkle that reads on white and on black.

### PageBackground (type)

"plain" | "soft" | "glow" | "aurora" | "grid" | "dots".

### BandBackground (type)

"muted" | "tinted" | "gradient" | "dots".

### PageBackdropProps (type)

Props of PageBackdrop.

### DEFAULT_NEWSLETTER_LABELS (constant)

The English strings of the newsletter form.

### MarketingSectionProps (type)

Props of MarketingSection.

### SectionHeadingProps (type)

Props of SectionHeading.

### NewsletterFormProps (type)

Props of NewsletterForm.

## Examples

- **Page backdrop with a band**: A PageBackdrop with an aurora main background and tinted bands: a plain section, then a band whose cards are lifted above it.
- **Newsletter band**: A narrow muted section with the newsletter form; try an invalid address, then a real one.
- **Page title, start aligned**: headingSize lg with an h1, as the first section of a docs or legal page.
- **Brand call to action**: The orange tone on the one hero action, the rest stays neutral.
- **Stacked newsletter, large**: The stacked layout at lg, as it sits in a sidebar or a footer.
- **Feature section, start aligned**: A security section on a pricing page: start-aligned heading, a ghost link action and three points under it.

## See also

- [Marketing Header](https://wingo-ui.com/components/marketing-header) ([Markdown](https://wingo-ui.com/components/marketing-header.md))
- [Marketing Footer](https://wingo-ui.com/components/marketing-footer) ([Markdown](https://wingo-ui.com/components/marketing-footer.md))
- [Hero Section](https://wingo-ui.com/components/hero-section) ([Markdown](https://wingo-ui.com/components/hero-section.md))
- [CTA Section](https://wingo-ui.com/components/cta-section) ([Markdown](https://wingo-ui.com/components/cta-section.md))
- [Newsletter Section](https://wingo-ui.com/components/newsletter-section) ([Markdown](https://wingo-ui.com/components/newsletter-section.md))
- [Pricing Page](https://wingo-ui.com/components/pricing-page) ([Markdown](https://wingo-ui.com/components/pricing-page.md))

---

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