Newsletter CTA
Newsletter signup CTA on dark zinc card: title, subtitle, email input, and subscribe button. Responsive row layout for blogs, SaaS changelogs, and weekly digest landing pages. Form-ready React markup.
Dependencies
react
npm install react react-domexport function NewsletterCta() {
return (
<section className="mx-auto max-w-lg rounded-2xl bg-zinc-900 px-6 py-10 text-center text-white">
<h3 className="text-xl font-semibold">Weekly UI drops</h3>
<p className="mt-2 text-sm text-zinc-400">New React components every Tuesday.</p>
<form className="mt-6 flex flex-col gap-2 sm:flex-row">
<input type="email" placeholder="you@company.com" className="flex-1 rounded-lg border border-zinc-700 bg-zinc-800 px-4 py-2.5 text-sm outline-none focus:border-indigo-500" />
<button type="submit" className="rounded-lg bg-indigo-500 px-5 py-2.5 text-sm font-semibold">Subscribe</button>
</form>
</section>
);
}
Please implement this code in the current project and add it to (Your Desired Section, e.g. homepage hero, pricing page, dashboard). Change the primary accent color to (YOUR HEX CODE COLOR, e.g. #6366F1).
Requirements:
- Use React + Tailwind CSS (match the project's existing setup)
- Install dependencies if needed: npm install react react-dom
- Keep the layout responsive on mobile and desktop
- Replace placeholder copy with content that fits the project
The UI code:
export function NewsletterCta() {
return (
<section className="mx-auto max-w-lg rounded-2xl bg-zinc-900 px-6 py-10 text-center text-white">
<h3 className="text-xl font-semibold">Weekly UI drops</h3>
<p className="mt-2 text-sm text-zinc-400">New React components every Tuesday.</p>
<form className="mt-6 flex flex-col gap-2 sm:flex-row">
<input type="email" placeholder="you@company.com" className="flex-1 rounded-lg border border-zinc-700 bg-zinc-800 px-4 py-2.5 text-sm outline-none focus:border-indigo-500" />
<button type="submit" className="rounded-lg bg-indigo-500 px-5 py-2.5 text-sm font-semibold">Subscribe</button>
</form>
</section>
);
}
Replace (Your Desired Section) and (YOUR HEX CODE COLOR) before pasting into Cursor, Copilot, or ChatGPT.