Skip to content

Block 43 of 297

CTA Banner

A focused call-to-action panel in three styles, left-aligned or centered.

Puck key
CtaBannerBlock
Export
ctaBannerBlock
React component
<CtaBanner />
Path
components/puck/cta-banner-block.tsx
Dependencies
None
License
MIT

About this block

When to use it, how to write for it, and what to change in the code.

What it's for

A rounded call-to-action panel with a heading, a short paragraph, a primary button and an optional secondary link, decorated with faint concentric rings. It comes in indigo, dark or light-outline styles, and the copy can sit left with buttons to the right or centered. On phones everything stacks and the buttons go full width.

  • Closing a program or campaign page with one clear next step
  • Breaking up a long article with a donate or volunteer prompt
  • A recurring sign-up prompt placed between sections on a landing page
Writing the content
  • Heading is a multi-line field, but one sentence of under about twelve words reads best in the panel.
  • Fill in both a button label and link: a label with no link still renders but points to #.
  • Leave Secondary link text blank to show only the primary button.
  • Pick a solid panel against white sections and the light outline on pages that already have a colored background.
Accessibility
  • Heading level is selectable from H1 to H4 so the panel fits the page outline without changing its look.
  • Both actions are real links with a 44px minimum height and a focus outline colored to contrast with each panel style (WCAG 2.4.7).
  • The ring pattern and the arrow on the secondary link are hidden from assistive technology.
Customizing the code
  • The three styles live in the themes object; edit its panel, primary and ring classes to add a brand palette.
  • The ring decoration is an inline SVG; change its size-96 class or remove it for a plain panel.

Editor fields

What content editors see in the P1 sidebar when they select this block.

  • Headingtextarea
  • Heading levelselect
  • Bodytextarea
  • Primary button texttext
  • Primary button linktext
  • Secondary link texttext
  • Secondary linktext
  • Styleselect
  • Layoutradio