Marketing Section React block for Tailwind CSS v4
v1.1.0Updated in 1.9.0
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.
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.
Marketing Section 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-section, together with Button, Input, Motion presets, Tones and UIProvider and the npm packages motion and 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-sectionUsage
Import MarketingSection from @/components/blocks/marketing-section.
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
eyebrowdefault"Why Acme"ReactNodeThe small uppercase line over the title.
titledefault"Everything your team needs, nothing it doesn't"ReactNodeThe section title; it balances over two lines and caps at 22 characters per line.
descriptiondefault"Plan the work, write it down and ship it, in one calm workspace that stays fast at 10 or 10,000 tasks."ReactNodeThe muted paragraph under the title.
actionsReactNodeButtons under the description; they stack full width on phones.
childrenReactNodeThe section's content, placed under the heading.
aligndefault"center""start" | "center"Where the heading sits.
widthdefault"lg""sm" | "md" | "lg" | "xl"The column: sm 720px (reading), md 960px, lg 1200px (the page width), xl 1400px.
spacingdefault"md""none" | "sm" | "md" | "lg"Vertical padding: sm 40 / 56px, md 56 / 96px, lg 80 / 128px (phone / desktop).
backgrounddefault"none""none" | "muted"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.
dividerdefaultfalsebooleanA hairline above the section.
headingSizedefault"md""md" | "lg"md for sections (26 / 36px titles), lg for a page's first heading (34 / 56px).
headingAsdefault"h2""h1" | "h2" | "h3"The title element.
idstringThe anchor; the title gets <id>-title and labels the section.
classNamestringClasses for the <section>.
classNamesPartial<Record<MarketingSectionSlot, string>>Classes for container, heading, eyebrow, title, description, actions and content.
Parts
SectionHeading
componentThe heading on its own (eyebrow, title, description, actions), for a hero or a card. Takes div props.
eyebrowReactNodeThe small uppercase line.
titleReactNodeThe title.
descriptionReactNodeThe muted paragraph.
actionsReactNodeButtons under it.
aligndefault"center""start" | "center"Text alignment.
sizedefault"md""md" | "lg"Section or page scale.
asdefault"h2""h1" | "h2" | "h3"The title element.
titleIdstringid of the title, for aria-labelledby.
classNamesPartial<Record<"eyebrow" | "title" | "description" | "actions", string>>Classes for the parts.
NewsletterForm
componentAn email field and a Subscribe button that validates, spins and confirms. Takes form props.
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.
layoutdefault"inline""inline" | "stacked"One row from 640px, or always stacked.
sizedefault"md""md" | "lg"Field and button height.
tonedefault"neutral"ToneThe button.
noteReactNodeA line under the form, the privacy promise.
labelsPartial<NewsletterFormLabels>email, placeholder, submit, success, invalid, failed.
PageBackdrop
componentThe 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.
backgrounddefault"glow""plain" | "soft" | "glow" | "aurora" | "grid" | "dots"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.
backgroundColordefault"oklch(0.62 0.14 275)"stringThe tint and glow color of the main background, any CSS color.
bandBackgrounddefault"muted""muted" | "tinted" | "gradient" | "dots"The secondary background, used by every background="muted" section inside.
bandColorstringThe tint of tinted and gradient bands; defaults to backgroundColor.
classNamesPartial<Record<"layer", string>>Classes for the decoration layer.
bandClasses
functionbandClasses(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
functionbandStyle(color?) returns the style that sets a band's tint (--band-color), or undefined without a color.
useBandBackground
hookThe band look of the nearest PageBackdrop (muted outside one), for custom band sections: cn(bandClasses(useBandBackground()), ...).
usePageBackground
hookThe 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
constantThe 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
typeProps of PageBackdrop.
DEFAULT_NEWSLETTER_LABELS
constantThe English strings of the newsletter form.
MarketingSectionProps
typeProps of MarketingSection.
SectionHeadingProps
typeProps of SectionHeading.
NewsletterFormProps
typeProps 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.
Files
- components/blocks/marketing-section.tsx
FAQ
Is the React Marketing Section 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 Section?
Run npx wingo-ui@latest add marketing-section. It also adds the Wingo UI items it builds on (Button, Input, Motion presets, Tones and UIProvider) and the npm packages motion and lucide-react. With shadcn, run npx shadcn@latest add https://wingo-ui.com/r/marketing-section.json.
See also
Used in
More React marketing sections
New components by email
New posts, product news and occasional offers from Wingo UI. We count clicks to keep it relevant.