MarketingNewsletter
Newsletter signup band: heading + subcopy + a caller-supplied form (email Input + Button) and an optional disclaimer line. Centered single column (default) or copy-left + form-right on ≥lg. Presentational and theme-driven.
Installation
pnpm dlx @hex-core/cli add marketing-newsletterUsage
import { MarketingNewsletter } from "@/components/ui/marketing-newsletter"Variant values
layoutComposition.| Value | Description |
|---|---|
centereddefault | Centered single column. |
split | Copy left, form right on ≥lg. |
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
titlerequired | ReactNode | — | Section heading. |
formrequired | ReactNode | — | The signup form — pass your own <form> with email Input + Button. |
description | ReactNode | — | Supporting subcopy below the title. |
disclaimer | ReactNode | — | Optional fine-print disclaimer below the form (privacy / unsubscribe note). |
layout | enum | centered | 'centered' for a hero-style band, 'split' for copy + form side-by-side on ≥lg. |
className | string | — | Additional classes applied to the root <section>. |
AI Guidance
When to use
Use to capture email subscriptions on landing / blog / about pages. 'centered' for end-of-page push; 'split' when paired with marketing copy.
When not to use
Don't use as the primary CTA (use marketing-cta). Don't use without a privacy disclaimer when collecting an email — most jurisdictions require notice.
Common mistakes
- Passing a button with no `type='submit'` — Enter on the input won't submit the form.
- Omitting `required` on the email Input — empty submissions reach the backend.
- Putting the form's submit handler in the parent's onClick instead of <form onSubmit> — breaks keyboard Enter and screen-reader announcements.
Accessibility
The block is layout; the form's labels and accessible names depend on the form you pass. Use <Label htmlFor> or aria-label on the email Input. The disclaimer is plain text positioned after the form so screen readers reach it in source order.
Related components
Token budget: 949
Verified against @hex-core/components@1.14.0