Skip to content

Call to Action Banner

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

Also known as: cta section, call to action band, signup banner, conversion banner

Call to Action Banner live demo

Open in new tab

Tailwind CSS code (HTML, CSS)

A bold, full-width call-to-action band built with Tailwind CSS: a rose-to-orange gradient, a large headline, a primary and a secondary button, and two short reassurance points. Place it between content sections or just above the footer of a landing page to turn readers into sign-ups.

How it works

The root is section.cb-banner. It uses bg-linear-to-br from-rose-700 via-rose-600 to-orange-600 for the gradient and relative isolate overflow-hidden so the decorative layers stay inside the band and behind the content.

Two decorative layers sit behind the text. The first is a ::before pseudo-element defined in style.css: a dotted radial-gradient texture that is masked with a linear-gradient, so it is visible on the left and fades out toward the right. The second is svg.cb-rings, three concentric circles in the top-right corner that rotate slowly with the cb-spin keyframes.

The content wrapper is a flex column on mobile and switches to a row at lg:flex-row, with the copy on the left and the actions on the right. On phones the buttons stack at full width; from sm they sit side by side. Both buttons carry the .cb-btn class, which lifts them by two pixels on hover, and the arrow icon .cb-arrow in the primary button slides to the right. The reassurance points are a small ul with check icons. No JavaScript is needed.

Customization

  • from-rose-700 via-rose-600 to-orange-600 on .cb-banner: change the gradient stops, for example from-indigo-700 via-violet-600 to-fuchsia-600; keep the left stop dark so white text stays readable.
  • --cb-dot-color in style.css: raise the alpha for a stronger dotted texture, or set it to transparent to remove it.
  • --cb-dot-size in style.css: increase to 32px for a sparser dot grid or lower to 14px for a finer one.
  • text-rose-700 on the primary .cb-btn: set the button label color to match a new gradient.
  • lg:flex-row on the inner wrapper: change to md:flex-row to put copy and buttons side by side on tablets too.
  • sm:text-5xl on #cb-title: lower to sm:text-4xl for a quieter headline.
  • Delete svg.cb-rings for a cleaner band without the rotating circles.

Use cases

  • Landing pages: a gradient band between sections turns readers into sign-ups
  • Above the footer: a large headline and two buttons give a last prompt to act
  • Product sites: a primary and secondary button offer two paths such as sign up or learn more
  • Reassurance: short points under the buttons ease doubts about starting

Accessibility

The band is a labelled landmark through aria-labelledby="cb-title". Both actions are real links with visible text, and they show a thick white focus-visible:outline-3 ring with an offset that stands out against the gradient. The secondary button has a bg-black/15 fill so its white label keeps contrast over the lighter orange end. All decorative SVGs use aria-hidden="true", and the reassurance points use role="list" so list semantics survive the reset. Under prefers-reduced-motion: reduce the ring rotation, button lift and arrow slide are disabled.

Usage notes

Requires the Tailwind browser build (added automatically) and the included style.css. Point the two href="#" values at your sign-up and contact pages. Multiple banners can share a page as long as each has a unique heading id.

Call to Action Banner at a glance

Framework
Tailwind CSS
Code
HTML, CSS
JavaScript
Only Tailwind CSS's own script
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Call to Action
License
Free for personal and commercial use

Questions about this template

Can I use the Call to Action Banner 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 Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear and add the CSS to your stylesheet. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. Only Tailwind CSS's own JavaScript is used, and the download already includes it.

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):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

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

More Call to Action

Split CTA with Email Capture – free Bootstrap 5 call to action template

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.

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.