Skip to content

CTA Section

The closing ask: a headline, a line that lowers the risk, and one or two buttons or an email field, on a plain, accent or inverted panel. A background is opt-in.

On this page
Used for
  • Closing call to action
  • Join the waitlist
  • Start free trial
  • Book a demo

Examples

Tone

Email capture

Installation

npx knowns-ui@latest add cta-section
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

title / lead
ReactNode
The ask, and one line that lowers the risk (trial length, no card, time to set up).
primary / secondary
{ label, href?, onClick?, external? }
One or two buttons.
capture
{ onSubmit, placeholder?, button?, note?, thanks? }
An email field. onSubmit gets a trimmed address; throw an Error to show its message. Shows thanks once it resolves.
tone
"plain" | "accent" | "inverted"
Default"plain"
The panel colour.
background
ReactNode
Opt-in: one of our Backgrounds behind the panel, filling it.
layout
"center" | "split"
Default"center"
Centred, or text left and actions right from 1024px.

The email field checks the address before calling onSubmit, keeps the button busy while it runs, and announces errors and the thank-you to screen readers. The message line is reserved, so an error does not push the page down.

What it handles

  1. 01Closes a page with a title, a lead and up to two actions: primary and secondary, each a MarketingAction with a label and a link or handler.
  2. 02Adds an email capture beside or instead of the buttons, with onSubmit, a placeholder, a button label, a thanks line and a note.
  3. 03Checks the address with looksLikeEmail, shows a busy button while onSubmit runs, and shows the message of a thrown error in the line under the field.
  4. 04Replaces the form with the thanks text in a status region once the submit resolves.
  5. 05Sets the panel tone to plain, accent or inverted, and swaps the button variants so they read on the dark tones.
  6. 06Places a background (one of the Backgrounds) behind the panel, and switches layout from centred to split with actions on the right from 1024px.

States

First render
Nothing. The panel paints as it is
none
Submitting
The button shows its loading state
none
Error
The message replaces the note under the field
none, at once
Success
The form is replaced by the thanks line
none, at once

Works with

When to use

When to use

  • The last section before the footer: one ask with a short reason to act now.
  • A newsletter or waitlist sign-up in the middle or end of a page.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI CTA Section to my app and wire it to my own data.
  • I need the last section before the footer: one ask with a short reason to act now. Set that up with the Knowns UI CTA Section.
  • Which CTA Section props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "cta-section" }) and search_docs({ query: "cta section" }).

Need help?

Stuck on CTA Section, or found something off? We read every message.