Skip to content

Split CTA with Email Capture

Bootstrap 5 split call-to-action with newsletter pitch on the left and a validated email signup form with consent checkbox on the right.

Also known as: newsletter signup section, email capture banner, subscribe call to action, email subscription form

Bootstrap 5 Call to Action Responsive Dark #cta #email #form #newsletter #responsive

Split CTA with Email Capture live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A Bootstrap 5 call-to-action band that puts the newsletter pitch on the left and an email capture form on the right, inside a dark green gradient panel. Use it at the end of blog posts, on landing pages or above the footer to grow a mailing list.

How it works

The root is section.sn-cta. Inside a Bootstrap container, the rounded .sn-panel holds a row with two col-lg-6 columns. The left column has the .sn-eyebrow pill, the .sn-title heading, the .sn-lead paragraph and the .sn-perks list. The right column holds .sn-card, a translucent glass card with the .sn-form. Below the lg breakpoint the columns stack, and below 576px the email field and the .sn-submit button stack too; from 576px up, .sn-field turns into a single white pill with the button inside it.

The form uses novalidate, so the script does the checking. On submit it tests the email against EMAIL_PATTERN and requires the consent checkbox. Invalid fields get is-invalid, aria-invalid="true" and their error id in aria-describedby, and the first invalid field receives focus. After the first attempt, input and change listeners re-validate live. A valid form shows the spinner, sets aria-disabled on the button and, after a short demo delay, resets the form and writes a confirmation into .sn-status.

Customization

  • --sn-bg-from and --sn-bg-to in .sn-cta: change the two colors of the panel gradient.
  • --sn-accent, --sn-accent-hover and --sn-accent-ink in .sn-cta: recolor the button, checkmarks, focus ring and success message.
  • --sn-radius in .sn-cta: make the panel and card corners rounder or square.
  • background: #f0fdf9 in .sn-cta: set the page area around the panel, or use transparent.
  • EMAIL_PATTERN at the top of script.js: tighten or relax the email check.
  • The window.setTimeout call in script.js: replace it with fetch() to your newsletter provider and show the message in its callback.
  • Swap the .sn-perks items for your own selling points; the list wraps on small screens.

Use cases

  • Blogs: place the signup panel at the end of posts to turn readers into newsletter subscribers
  • Landing pages: a pitch on the left and email form on the right grows your mailing list
  • Above website footers: a dark green panel gives the signup a clear final call-to-action
  • Compliance-conscious sites: a consent checkbox and validated email field collect subscribers responsibly

Accessibility

The section is labelled by #sn-title. The email input has a visible label and is always described by the #sn-hint text; error messages are added to aria-describedby only while a field is invalid. The consent checkbox is required and has its own error. During sending the button uses aria-disabled instead of disabled, so focus is not lost. .sn-status is a polite live region, so the confirmation is announced. The button has a white focus-visible outline, icons are aria-hidden, and the success animation is removed with prefers-reduced-motion: reduce.

Usage notes

Requires Bootstrap 5 and Bootstrap Icons. Each .sn-cta instance is wired independently, but give the ids (sn-email, sn-consent and their errors) unique values if you place two on one page.

Split CTA with Email Capture at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile, dark design
Category
Call to Action
License
Free for personal and commercial use

Questions about this template

Can I use the Split CTA with Email Capture code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Split CTA with Email Capture – free Bootstrap 5 call to action template
Split CTA with Email Capture · free Bootstrap 5 call to action template

More Call to Action

Call to Action Card with Photo Background – free WordPress call to action template

Call to Action Card with Photo Background

Gutenberg call to action card with a rounded photo background, dark overlay, left-aligned heading, text and button, shown inside a light section.

Call to Action Banner with Two Buttons – free WordPress call to action template

Call to Action Banner with Two Buttons

Dark Gutenberg call to action banner with a centered headline, primary and outline buttons and a no credit card required reassurance line.

Call to Action Banner – free Tailwind CSS call to action template

Call to Action Banner

Bold full-width Tailwind CSS call-to-action band with a gradient background, two buttons and reassurance points.